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.
Logical properties, container queries, :has
, :is
, :where
, min()
, max()
, clamp()
, nesting, cascade layers, subgrid, and more.
James describes his process for designing fluid grid layouts, which very much involves working with the grain of the web but against the grain of our design tools:
In 2022 our design tools are still based around fixed-size artboards, while we’re trying to design products which scale gracefully to suit any screen.
Here’s a really nice little tool inspired by Utopia for generating one-off clamp()
values for fluid type or spacing.
To complement her talk at Beyond Tellerrand, Stephanie goes through some of the powerful CSS features that enable intrinsic web design. These are all great tools for the declarative design approach I was talking about:
Yet another clever technique from Lea. But I’m also bookmarking this one because of something she points out about custom properties:
The browser doesn’t know if your property value is valid until the variable is resolved, and by then it has already processed the cascade and has thrown away any potential fallbacks.
That explains an issue I was seeing recently! I couldn’t understand why an older browser wasn’t getting the fallback I had declared earlier in the CSS. Turns out that custom properties mess with that expectation.
A beautiful audio and visual history of the Lomax’s journey across:
On March 31 1939, when John and Ruby Lomax left their vacation home on Port Aransas, Texas, they already had some idea of what they would encounter on their three-month, 6,502 mile journey through the southern United States collecting folk songs.
When min()
gets better support (it’s currently in Safari), we’ll be able to create container queryish declarations like this:
grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
A good use case for using minmax
with CSS grid to dispense with a media query.
Play the part of an AI pursuing its goal without care for existential threats. This turns out to be ludicrously addictive. I don’t want to tell you how long I spent playing this.
Keep your eye on the prize: remember that money (and superintelligence) is just a means to an end …and that end is making more paperclips.
A deep dive into the CSS declaration that Jen told me she wants on a T-shirt.
A great description of one of the most powerful features in CSS Grid.
This function opens the door to us being able to write much more powerful and succinct CSS by allowing us to set, as a value for a grid track, a function including both a minimum and maximum value.
Oh, what a spray! What a lovely spray!
The best description of Mad Max: Fury Road. Read.
Thanks to Jason Scott, every episode of The Sound Of Young America ever recorded is now stored on the Internet Archive. Get huffduffing!