
Sign up to save your podcasts
Or


2026; I think every front-end developer should know how to
This is only some of the CSS that shipped in 2025 you need to know.
Earlier this year these were just experiments, now they're available in stable Chrome and Safari!
They let you use an element's position relative to its siblings as values in calculations. For example, you can stagger elements with a transition delay based on their sibling-index().
A nice trick is to subtract 1 so the first element starts immediately:
Stagger enter stage animations easily by combining with @starting-style!
You can rotate hues in oklch, automatically number elements, and all sorts of fun things.
These features fit nicely into progressive enhancement, similar to scroll driven animations, as they're enhancements rather than requirements. IMO at least.
Three states of a scroller are now queryable:
stuck, snapped, scrollable and scrolled.
To start, you need the element that's stuck, snapped, or scrollable to have container-type: scroll-state. Then, a child can query it with @container scroll-state().
Perfectly know when position: sticky elements are stuck.
Use this to help users understand an element will now be overlaying their scroll content.
Perfectly know when scroll-snap alignment is active.
Great for highlighting the item, or demoting every other item.
Perfectly know when content overflows its container, and in which direction(s).
Use this to toggle hints, scroll indicators, or adjust padding to signal more content.
Perfectly know when content is scrolled in a direction.
Use this for sticky headers or navbars that showy hidey based on scroll direction.
text-box lets you slice half-leading right off a text box!
Web font rendering includes whitespace above and below glyphs for "safe spacing", but sometimes you want pixel-perfect alignment to baselines or x-heights.
Achieve the above image with:
That one-liner trims spacing above cap height and below alphabetic baselines.
Learn more in my interactive notebook
Perfect for type and grid alignment nerds. I think it'll become the default.
There's an advanced version of attr(); type-safe and more powerful.
It allows using HTML attributes directly in CSS with type checking and fallbacks.
Pass colors:
Pass numbers:
This creates a powerful bridge between HTML and CSS.
Here's a scroll snap example where CSS basically controls the enums and HTML must pass valid values to get the desired snap results:
The type() function validates attribute values against allowed keywords. Invalid values fall back gracefully.
Try it on Codepen
CSS rules.
Now let's laugh at this hilarious obvious AI generated nano banana image I made about us having our cake and eating it too.
Still can't do hands lol
By 2026; I think every front-end developer should know how to
This is only some of the CSS that shipped in 2025 you need to know.
Earlier this year these were just experiments, now they're available in stable Chrome and Safari!
They let you use an element's position relative to its siblings as values in calculations. For example, you can stagger elements with a transition delay based on their sibling-index().
A nice trick is to subtract 1 so the first element starts immediately:
Stagger enter stage animations easily by combining with @starting-style!
You can rotate hues in oklch, automatically number elements, and all sorts of fun things.
These features fit nicely into progressive enhancement, similar to scroll driven animations, as they're enhancements rather than requirements. IMO at least.
Three states of a scroller are now queryable:
stuck, snapped, scrollable and scrolled.
To start, you need the element that's stuck, snapped, or scrollable to have container-type: scroll-state. Then, a child can query it with @container scroll-state().
Perfectly know when position: sticky elements are stuck.
Use this to help users understand an element will now be overlaying their scroll content.
Perfectly know when scroll-snap alignment is active.
Great for highlighting the item, or demoting every other item.
Perfectly know when content overflows its container, and in which direction(s).
Use this to toggle hints, scroll indicators, or adjust padding to signal more content.
Perfectly know when content is scrolled in a direction.
Use this for sticky headers or navbars that showy hidey based on scroll direction.
text-box lets you slice half-leading right off a text box!
Web font rendering includes whitespace above and below glyphs for "safe spacing", but sometimes you want pixel-perfect alignment to baselines or x-heights.
Achieve the above image with:
That one-liner trims spacing above cap height and below alphabetic baselines.
Learn more in my interactive notebook
Perfect for type and grid alignment nerds. I think it'll become the default.
There's an advanced version of attr(); type-safe and more powerful.
It allows using HTML attributes directly in CSS with type checking and fallbacks.
Pass colors:
Pass numbers:
This creates a powerful bridge between HTML and CSS.
Here's a scroll snap example where CSS basically controls the enums and HTML must pass valid values to get the desired snap results:
The type() function validates attribute values against allowed keywords. Invalid values fall back gracefully.
Try it on Codepen
CSS rules.
Now let's laugh at this hilarious obvious AI generated nano banana image I made about us having our cake and eating it too.
Still can't do hands lol