CSS wants to be a system - daverupert.com
CSS wants you to build a system with it. It wants styles to build up, not flatten down.
Truth!
I’m very glad to see that work has moved away from a separate selectmenu
element to instead enhancing the existing select
element—I could never see an upgrade path for selectmenu
, but now there are plenty of opportunities for progressive enhancement.
CSS wants you to build a system with it. It wants styles to build up, not flatten down.
Truth!
Heydon does a very good job of explaining why throwing away the power of selectors makes no sense.
Utility-first detractors complain a lot about how verbose this is and, consequently, how ugly. And it is indeed. But you’d forgive it that if it actually solved a problem, which it doesn’t. It is unequivocally an inferior way of making things which are alike look alike, as you should. It is and can only be useful for reproducing inconsistent design, wherein all those repeated values would instead differ.
He’s also right on the nose in explaining why something as awful at Tailwind could get so popular:
But CSS isn’t new, it’s only good. And in this backwards, bullshit-optimized economy of garbage and nonsense, good isn’t bad enough.
A collection of stylesheets that don’t use class selectors. Think of them as alternatives to default user-agent stylesheets.
A terrific tour of just some of the fantastic ways you can use :has()
in CSS.
The section on using it with sibling selectors blew my mind:
How often have you wanted to adjust the margins on a headline based on the element following it? Now it’s easy. This code allows us to select any h2 with a p immediately after it.
h2:has(+ p) { margin-bottom: 0; }
Amazing.
This detailed proposal from Miriam for scoping CSS is well worth reading—it makes a lot of sense to me.
Trying to understand a different mindset to mine.
The latest installment in the long tradition of calling for this pseudo-element.
How I switched to high-resolution maps on The Session without degrading performance.
Having fun with view transitions and scroll-driven animations.
Here’s Clearleft’s approach to browser support. You can use it too (it’s CC-licensed).