News for hackers. Stuff that matters.
Re:Signals for Tailwind CSS (styling based on ancestor state... by troupo on Sunday September 01, 2024 @02:48AM (#41414850)
> because of Safari, Firefox and other browsers that lag far behind the standard.

I could've guessed there would be a blame game.

No, neither Safari nor Firefox lag in web standards. Moreover, it was Firefox (IIRC) which figured out how to do nesting safely.

However, even beyond nesting there multiple other things that lagged in browsers. CSS Scope was completely derailed by Chrome's push for Web Components, and had to be solved by other tools.

Nesting, mixins and a lot of other tools were long seen by all browser vendors as "unnecessary and better solved by tools". So yes, SASS isn't a replacement but there are reasons why it existed and was a nearly de-facto standard in tooling for so long. And that reason isn't "CSS is so great".

> And regarding why BEM exists: it's just a flavour of naming convention for your "API", nowhere mandated by CSS itself. Its main purpose is to optimise paint performance

No, it's main purpose is to try and close the gap in CSS: CSS is/was absolutely horrendously unsuitable for any type of componentized code. And BEM was an attempt to solve that at the process/naming level.

No, BEM isn't mandated by CSS. However, it exists because CSS had literally no tools to support the use cases BEM was aimed at.

> But I'm unsure if we talk about the same things in the end, cause none of those points get any better with Tailwind

I didn't even talk about Tailwind. I was directly addressing your claims about CSS.

CSS was never great.

There are no comments on this comment yet.