
CSS style queries: one variable, every style
Container style queries let a component restyle itself from the value of a custom property, and since May 2026 they work in every major browser.
Tag archive

Container style queries let a component restyle itself from the value of a custom property, and since May 2026 they work in every major browser.

The CSS progress() function turns any value into a 0-to-1 ratio, so one container width can drive size, colour, shadow and staggered reveals with no JavaScript.

Container style queries hit Baseline in May 2026. Here's how to let a parent's custom property drive its children's styles, plus the one gotcha that trips everyone up.
Dalle scroll state queries alle anchored container queries: nuovi strumenti per reagire allo stato...
A Smashing Magazine piece by Victor Ayomipo argues that container queries have ~94% support and only 41.4% adoption because developers keep porting media-query breakpoints instead of letting components respond to their own container size.
Le style queries sono finalmente cross‑browser: usale per far decidere al contesto come deve...
Scroller orizzontali senza JS, griglie che non vanno in overflow e componenti davvero adattivi con...
Complete guide to CSS container queries — syntax, real-world patterns, container query units, style queries, and when to still use media queries.
Not all display values support containers. Plus, a handy way to hide table columns.
Container queries are amazing. They let us build UI that allow a component looks good no matter what...

I've been playing around with container queries and so far, there is only one best practice that I...
Note: This post contains elements that require JavaScript. While I try to...