New CSS that can actually be used in 2024 | Thomasorus
Logical properties, container queries, :has
, :is
, :where
, min()
, max()
, clamp()
, nesting, cascade layers, subgrid, and more.
In which Matthew disects a multiple choice quiz that uses CSS to do some clever logic, using the :checked
pseudo-class and counter-increment
.
Oh, and this is how he realised it wasn’t using JavaScript:
I have JavaScript disabled on my phone because a) it cuts out most of the ads, b) it cuts out lots of bandwidth and I have a limited data plan, and c) my battery lasts longer because it’s not processing tons of code to show me some text (cough, Medium).
Logical properties, container queries, :has
, :is
, :where
, min()
, max()
, clamp()
, nesting, cascade layers, subgrid, and more.
I like the approach here: logical properties and sensible default type and spacing.
Adam makes a very good point here: the term “vertical rhythm” is quite chauvanistic, unconciously defaulting to top-to-bottom writing modes; the term “logical rhythm” is more universal (and scalable).
This is a terrrific presentation by Chris, going through some practical implementations of modern CSS: logical properties, viewport units, grid, subgrid, container queries, cascade layers, new colour spaces, and view transitions.
Good question.
I think it’s mostly inertia.
You might want to use `display: contents` …maybe.
The joy of getting hands-on with HTML and CSS.
Using the CSS trinity of feature queries, logical properties, and unset.
Let me hear your blocky talk.
Defining the inputs instead of trying to control the outputs.