Post

Over the last 2 years I’ve gone from “CSS is a nightmare of unintuitive incantations” to “CSS is one of my favourite technologies.” I still don’t feel like I understand it as well as I’d like, but I’m so much more comfortable and feel so much less lost using it.

Until about 2012 I really *knew* css, but then flexbox and grid happed, along with other new stuff. Life got busy. And I felt like I didn't know it any more. But I the last few years I feel like I'm back on it, I know flexbox now, and loving that it's caught up with SASS with nested selectors/rules.

Sadly I can’t use native nested CSS yet. I used it in a post and a reader got in touch to say the post looked weird to them. Debugged it and figured out the browser they’re using (Floorp, never heard of it before) was using an older Firefox-based renderer that didn’t support nested CSS 🫠

0 reposts2 likes

A couple of years ago, as a reaction to tailwind, I wrote a tiny js lib for extracting nested inline css from a html attribute. It was a lot of fun to make, the "un-nest" plugin is only 982 bytes. That experiment went nowhere, but point is that un-nesting css is quite easy github.com/samwillis/x-...

github.comGitHub - samwillis/x-style: x-style (Extract Style) - A Tiny Inline Nested CSS Libraryx-style (Extract Style) - A Tiny Inline Nested CSS Library - samwillis/x-style