Search
No Motion Isn’t Always prefers-reduced-motion
8.2.2022
There is a code snippet that I see all the time when the media query prefers-reduced-motion is talked about. Here it is:
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms...
Empathetic Animation
29.12.2021
Animation on the web is often a contentious topic. I think, in part, it’s because bad animation is blindingly obvious, whereas well-executed animation fades seamlessly into the background. When handled well, animation can really elevate a website, whether it’s just …
Sticky Headers: 5 Ways to Make Them Better
21.4.2021
Page Laubheimer says that if you’re going to do a sticky header…
Keep it small.
Visually contrast it with the rest of the page.
If it’s going to move, keep it minimal. (I’d say, respect prefers-reduced-motion.)
Consider “partially persistent
…
The post Sticky...
Weekly Platform News: Reduced Motion, CORS, WhiteHouse.gov, popups, and 100vw
26.2.2021
In this week’s roundup, we highlight a proposal for a new <popup> element, check the use of prefers-reduced-motion on award-winning sites, learn how to opt into cross-origin isolation, see how WhiteHouse.gov approaches accessibility, and warn the dangers of 100vh.…
The post...
Responsible, Conditional Loading
25.12.2020
Over on the Polyplane blog (there’s no byline but presumably it’s Kilian Valkhof), there is a great article, Creating websites with prefers-reduced-data, about the prefers-reduced-data media query. No browser support yet, but eventually you can use it in CSS to make choices that reduce...
Representation Matters
15.12.2020
This year I had the pleasure of re-launching The Accessibility Project. I spend a lot of time researching and writing about accessibility and inclusive design, so this felt like the cumulation of a lot of that effort. The site now uses all sorts of cool web features like CSS Grid, @supports,...
Creating websites with prefers-reduced-data
8.12.2020
Spoiler alert: There is no support for it yet. But it is defined in the Media Queries Level 5 spec that includes other recent, but more familiar user preference features, like prefers-color-scheme and prefers-reduced-motion.
The Polypane blog goes into incredible depth on prefers-reduced-data...
GIFS and prefers-reduced-motion
3.11.2020
The <picture> element has a trick it can do where it shows different image formats in different situations. If all you are interested in is formats for the sake of performance, maybe you’d do:
<picture<source srcset="img/waterfall.avif" type="image/avif"<source...
Accessible Web Animation: The WCAG on Animation Explained
22.9.2020
It’s true, web animation can be accessible! Sometimes it just takes a little extra effort to make sure that it is. There are strategic things we can do to make sure our animations have a positive impact on accessibility, like planning how they contribute to the overall UX and ease of use of...
Levels of Fix
20.7.2020
On the web, we have the opportunity to do work that fixes things for people. It’s fascinating to me how different the scope of those fixes can be.
Consider the media query prefers-reduced-motion. Eric wrote:
I think it’s also worth pointing out the true...
CSS background-repeat: round
23.6.2020
The CSS spec is full of gems that sneak their way past most of us web designers and developers. Stuff like :focus-within, prefers-reduced-motion, and prefers-color-scheme suddenly make their way into CSS without us really finding out for months or years. One such example is background-repeat:...
CSS-Only Marquee Effect
5.4.2020
You make sure the text is more than twice the width of the screen, then use negative translate animations to do the marquee movement.
You’ll probably want to aria-hidden all but one of them if you need to duplicate the text. Or, you could use a very clever CSS trick...
The Web in 2020: Extensibility and Interoperability
22.1.2020
In the past few years, we’ve seen a lot of change and diversion in regard to web technologies. In 2020, I foresee us as a web community heading toward two major trends/goals: extensibility and interoperability. Let’s break those down.
Extensibility
Extensibility describes...
CSS prefers-reduced-motion Media Query
30.7.2019
When I started in the web development industry, media queries were limited — screen and print were the two media queries I was most often using. More than a decade later, media queries have advanced to various screen units, feature checking, and even color scheme preference. I’ve been...
Reduced Motion Picture Technique, Take Two
21.6.2019
Did you see that neat technique for using the <picture> element with <source media=""> to serve an animated image (or not) based on a prefers-reduced-motion media query?
After we shared that in our newsletter, we got an interesting reply from Michael Gale:
What about folks who love...
Snag Resources from An Event Apart Boston 2019 and Save on Washington D.C. Registration
6.6.2019
(This is a sponsored post.)
Hey, so we talked a little bit about An Event Apart Boston 2019 leading up to the event and now there are a ton of resources available from it. I stopped counting the number of links after 50 because there's way more than that. Seriously, there's stuff in there...
Reducing motion with the picture element
31.5.2019
Here’s a bonafide CSS/HTML trick from Brad Frost and Dave Rupert where they use the <picture> element to switch out a GIF file with an image if the user has reduced motion enabled. This is how Brad goes about implementing that:
<picture>
<!-- This image will be loaded if...
Revisiting prefers-reduced-motion, the reduced motion media query
30.4.2019
Two years ago, I wrote about prefers-reduced-motion, a media query introduced into Safari 10.1 to help people with vestibular and seizure disorders use the web. The article provided some background about the media query, why it was needed, and how to work with it to avoid creating...