Animating zooming using CSS: transform order is important… sometimes

2025年6月17日

I was using Discord the other day. I tapped to zoom into an image, and it animated in an odd way that I'd seen before. Like this:

Notice how it kinda 'swoops' into the wildcat's face, rather than zooming straight in? See how the right-hand side of the cat's head goes out-of-frame, and then back in again?

I recognised it immediately because I'd made the same mistake myself on another project.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Jake Archibald

JPEG XL vs AVIF for web use-cases

JPEG XL has now landed in all major browsers, so I figured I'd take a closer look at what it's good/bad at compared to other formats. Conclusions I'll go into full detail, with examples and benchmarks, but for those of you who don't have th

Controlling when CSS custom property values are computed

When and how CSS custom property values are calculated might not be what you expect, and it has a big impact on your styles. The default Take this HTML: <div></div><div class="second-item"> <p>…</p></div> And this CSS: .second-item { --inde

Fixing my tooltip accessibility mistake

I made an accessibility error, and I want you to learn from my mistakes. I've been making short videos recently about web platform features as they land in Firefox, and also about other web standards & development stuff. If you'd prefer to

The Goldilocks customizable select height

I recently gave a talk on customizable (as in fully-stylable) <select>, and as I was building demos I realised there's a sizing 'pattern' that's almost always the-one-you-want, but it took me a long time to figure out how to do it in CSS. W

Importing vs fetching JSON

This year, JSON module imports became baseline 'newly available', meaning they're implemented across browser engines. import data from './data.json' with { type: 'json' }; // And… const { default: data } = await import('./data.json', { with