Lowering the specificity of multiple rules at once - Manuel Matuzovic
This is clever, and seems obvious in hindsight: use an anonymous @layer for your CSS reset rules!
I’m not the only one swapping out Sass with CSS for colour functions:
Because of the declarative nature of CSS, you’re never going to get something as terse as what you could get in Sass. So sure, you’re typing more characters. But you know what you’re not doing? Wrangling build plugins and updating dependencies to get Sass to build. What you write gets shipped directly to the browser and works as-is, now and for eternity. It’s hard to say that about your Sass code.
This is clever, and seems obvious in hindsight: use an anonymous @layer for your CSS reset rules!
Here’s a little snippet of CSS that solves a problem I’ve never considered:
The problem is that Live Text, “Select text in images to copy or take action,” is enabled by default on iOS devices (Settings → General → Language & Region), which can interfere with the contextual menu in Safari. Pressing down on the above link may select the text inside the image instead of selecting the link URL.
This is a spot-on analysis of how CSS-in-JS failed to deliver on any of its promises:
CSS-in-JS was born out of good intentions — modularity, predictability and componentization. But what we got was complexity disguised as progress.
Another clever use of clamp() and calc() for web typography, but this time it’s adjusting letter-spacing.
I’m not the only one who’s amazed by how much you can do with just a little CSS these days.
How to make the distance of link underlines proportional to the line height of the text.
Programming with CSS.
A redesign with modern CSS.
Styling a document about The Culture novels of Iain M Banks.
Why do browsers that don’t implement stylesheet switching still download alternative stylesheets?