Remix Icon - Open source icon library
I love how easy it is to use these icons: you can copy and paste the SVG or even get it encoded as a data URL.
I love how easy it is to use these icons: you can copy and paste the SVG or even get it encoded as a data URL.
The books I have written are created from words invented by others, filled with ideas created by others. Even the few new ideas that are new depend on older ideas to work. What I had to say would probably be said by someone else not long after me. (More probably there have already been said by someone I was not aware of.) I may be the lucky person to claim those rare new ideas, but the worth of my art primarily resides in the great accumulation of the ideas and works of thousands of writers and thinkers before me — what I call the commons. My work was born in the commons, it gets its value by being deeply connected to the commons, and after my brief stewardship of those tiny new bits, it should return to the commons as fast as possible, in as many ways as possible.
Apparently the sentence forms that I kicked off with Huffduffer are making a comeback.
When I was speaking at conferences last year about service workers, I’d introduce the Cache API. I wanted some way of explaining the difference between caching and other kinds of storage.
The way I explained was that, while you might store stuff for a long time, you’d only cache stuff that you knew you were going to need again. So according to that definition, when you make a backup of your hard drive, that’s not caching …becuase you hope you’ll never need to use the backup.
But that explanation never sat well with me. Then more recently, I was chatting with Amber about caching. Once again, we trying to define the difference between, say, the Cache API and things like LocalStorage and IndexedDB. At some point, we realised the fundamental difference: caches are for copies.
Think about it. If you store something in LocalStorage or IndexedDB, that’s the canonical home for that data. But anything you put into a cache must be a copy of something that exists elsewhere. That’s true of the Cache API, the browser cache, and caches on the server. An item in one of those caches is never the original—it’s always a copy of something that has a canonical home elsewhere.
By that definition, backing up your hard drive definitely is caching.
Anyway, I was glad to finally have a working definition to differentiate between caching and storing.
A people’s history of copying, from art to software.
Designers copy. We steal like great artists. But when we see a copy of our work, we’re livid.
Considering how much accessibility work happens “under the hood”, it’s interesting that all five of these considerations are visibly testable.
- Think about accessible copy
- Don’t forget about the focus indicator
- Check your colour contrast
- Don’t just use colour to convey meaning
- Design in anticipation of text resizing
Remember a while back I wrote about some odd behaviour with the Web Share API in Safari on iOS?
When the
share()
method is triggered, iOS provides multiple ways of sharing: Messages, Airdrop, email, and so on. But the simplest option is the one labelled “copy”, which copies to the clipboard.Here’s the thing: if you’ve provided a text parameter to the
share()
method then that’s what’s going to get copied to the clipboard—not the URL.That’s a shame. Personally, I think the
url
field should take precedence.
Tess filed a bug soon after, which was very gratifying to see.
Now Phil has put together a test case:
- Share URL, title, and text
- Share URL and title
- Share URL and text
Very handy! The results (using the “copy” to clipboard action) are somewhat like rock, paper, scissors:
So it’s more like rock, paper, high explosives.
A look at the trend towards larger and larger font sizes for body copy on the web, culminating with Resilient Web Design.
There are some good arguments here for the upper limit on the font size there being too high, so I’ve adjusted it slightly. Now on large screens, the body copy on Resilient Web Design is 32px (2 times 1em), down from 40px (2.5 times 1em).
That unusual behaviour I wrote about with the Web Share API in Safari on iOS is now officially a bug—thanks, Tess!
I implemented the Web Share API over on The Session back when it was first available in Chrome in Android. It’s a nifty and quite straightforward API that allows websites to make use of the “sharing drawer” that mobile operating systems provide from within a web browser.
I already had sharing buttons that popped open links to Twitter, Facebook, and email. You can see these sharing buttons on individual pages for tunes, recordings, sessions, and so on.
I was already intercepting clicks on those buttons. I didn’t have to add too much to also check for support for the Web Share API and trigger that instead:
if (navigator.share) {
navigator.share(
{
title: document.querySelector('title').textContent,
text: document.querySelector('meta[name="description"]').getAttribute('content'),
url: document.querySelector('link[rel="canonical"]').getAttribute('href')
}
);
}
That worked a treat. As you can see, there are three fields you can pass to the share()
method: title
, text
, and url
. You don’t have to provide all three.
Earlier this year, Safari on iOS shipped support for the Web Share API. I didn’t need to do anything. ‘Cause that’s how standards work. You can make use of APIs before every browser supports them, and then your website gets better and better as more and more browsers add support.
But I recently discovered something interesting about the iOS implementation.
When the share()
method is triggered, iOS provides multiple ways of sharing: Messages, Airdrop, email, and so on. But the simplest option is the one labelled “copy”, which copies to the clipboard.
Here’s the thing: if you’ve provided a text
parameter to the share()
method then that’s what’s going to get copied to the clipboard—not the URL.
That’s a shame. Personally, I think the url
field should take precedence. But I don’t think this is a bug, per se. There’s nothing in the spec to say how operating systems should handle the data sent via the Web Share API. Still, I think it’s a bit counterintuitive. If I’m looking at a web page, and I opt to share it, then surely the URL is the most important piece of data?
I’m not even sure where to direct this feedback. I guess it’s under the purview of the Safari team, but it also touches on OS-level interactions. Either way, I hope that somebody at Apple will consider changing the current behaviour for copying Web Share data to the clipboard.
In the meantime, I’ve decided to update my code to remove the text
parameter:
if (navigator.share) {
navigator.share(
{
title: document.querySelector('title').textContent,
url: document.querySelector('link[rel="canonical"]').getAttribute('href')
}
);
}
If the behaviour of Safari on iOS changes, I’ll reinstate the missing field.
By the way, if you’re making progressive web apps that have display: standalone
in the web app manifest, please consider using the Web Share API. When you remove the browser chrome, you’re removing the ability for users to easily share URLs. The Web Share API gives you a way to reinstate that functionality.
Bruce wonders why Google seems to prefer separate chunks of JSON-LD in web pages instead of interwoven microdata attributes:
I strongly feel that metadata that is separated from the user-visible data associated with it highly susceptible to metadata partial copy-paste necrosis. User-visible text is also developer-visible text. When devs copy/ paste that, it’s very easy to forget to copy any associated metadata that’s not interleaved, leading to errors.
For all your copying and pasting needs:
A delightful reference for HTML Symbols, Entities and ASCII Character Codes
Dan compares the relationship between a designer and developer in the web world to the relationship between an art director and a copywriter in the ad world. He and Brad made a video to demonstrate how they collaborate.
A really interesting and well-executed portfolio site, utterly let down by the tone of this demeaning and insulting piece of copy:
WARNING: Do not proceed if you suffer from vertigo or if you find experimental interfaces offensive.
(Pssst: copy is also interface.)
Joe’s site is very clever …but is it as clever as Jon’s?
Jon’s site is very clever …but is it as clever as Joe’s?
According to this, the forthcoming Clearleft redesign will be totally on fleek.
The (literally) hidden dangers of copying code snippets from the web and pasting them into the command line.
This cautionary tale backs up a small tip I heard for getting to understand how found code works: deliberately type it out instead of copying and pasting.
Ever been on one of those websites that doesn’t allow you to paste into the password field? Frustrating, isn’t it? (Especially if you use a password manager.)
It turns out that nobody knows how this ever started. It’s like a cargo cult without any cargo.
Krystal’s excellent annotated collection of onboarding examples.