39 minutes ago · Tech · hide · 0 comments

I am late. It was already in 2022 that Miriam Suzanne wrote her Cascade Layers Guide for CSS-Tricks. And yet, late 2026 is the first time I give a proper look at CSS layers. Between a few years in upper management, and working on CSS-in-JS codebases, I never really got a good opportunity to pay attention to this relatively recent specification. So over the weekend, I sat down and took a moment to better understand how CSS layers work, and implement them on this website. There was no real need, really. Styles are light, and it’s not like I was constantly fighting specificity. But the nice thing about having a personal website is that I can use it for all sorts of experiments and learnings. :) In a nutshell CSS layers intend to fix one of the oldest CSS problems: all styles exist globally within the same context, and their application relies on the specificity of selectors and the Cascade™ — things a lot of styling frameworks have opted to largely ignore, for better and for worse. The…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.