Live data from Hacker News

The Evolution of Scalable CSS

frontendmastery.com

51–59 of 59 posts

Re: The Evolution of Scalable CSS

#51

Earlier quoted context omitted.

Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than understandable naming. It then leverages this brevity to let people over-define styles directly in the HTML, which would otherwise take paragraphs of normal CSS and therefore be unwieldy to do (so you'd just alias it into a new CSS property in a separate file).…

> Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than understandable naming. Tailwind takes the "cascading" and "sheets" out of CSS. Instead of describing what types of things look like, it forces you to describe how each individual instance of everything looks. Which is a valid thing to do, but it's absolutely…

Yeah but you can do that with CSS, you'd just never want to as it's too verbose and a pain to change en-masse compared to abstracted classes. Those concerns don't go away with Tailwind - they're just less trouble to type.

Re: The Evolution of Scalable CSS

#52

Earlier quoted context omitted.

Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than understandable naming. It then leverages this brevity to let people over-define styles directly in the HTML, which would otherwise take paragraphs of normal CSS and therefore be unwieldy to do (so you'd just alias it into a new CSS property in a separate file).…

Tailwind is neither a DSL nor is it any kind of standard. It's literally just utility classes. The "compiler" is really just tree-shaking. I feel like I'm taking crazy pills.

I hope you're right, and it's always easy to automatically replace Tailwind with vanilla CSS, but I'm not so sure anymore

Re: The Evolution of Scalable CSS

#54
post #23

I never understood this with BEM: .nav { &__link { } } Why not this?: .nav { a { } }

To avoid CSS inheritance & specificity, the "Cascading" part of CSS is the actual root of all evil. If you think about it, all the modern approaches to CSS (BEM, Atomic CSS, OOCSS) try to avoid it all cost.

To avoid CSS inheritance & specificity, the "Cascading" part of CSS is the actual root of all evil.

The Cascade is CSS’a superpower.

If only someone would come up with a way to write CSS to make the cascade work for you, not against you.

Oh wait; that would be Inverted Triangle CSS.

[1]: https://www.xfive.co/blog/itcss-scalable-maintainable-css-ar...

Re: The Evolution of Scalable CSS

#55
post #27

There is actually a W3C working group working on a standardised design token schema specification and on adoption by design tooling. Several big names such as Adobe are actively involved, so this has some weight to it. https://github.com/design-tokens

[deleted]

Re: The Evolution of Scalable CSS

#56
I saw the link to CSS Garden in the second section and was happy to see the site is still up and working. Separation of concerns is such a powerful idea — losing it by tying styles too tightly to markup is a huge step backwards.

Re: The Evolution of Scalable CSS

#57
post #50

Earlier quoted context omitted.

The conclusion I took from the article was that CSS simply isn’t scalable. I’ve been hearing about web components for years and nothing seems to have materialized. I’ve never built something where I thought to even use shadow DOM. Tailwind is the only solution that meets the stated aims. If tailwind doesn’t adhere to the dogma for how CSS should work in principle, well that’s a lovely problem to have.

"Nothing seems to have materialized..." --> https://nordhealth.design/ -- these are all custom components. And here is D. Darnes explaining in part how they get things done: https://web.dev/custom-properties-web-components/ CSS is scalable. You have to actually know CSS in order to accomplish it. I've been here since mid-90s, when CSS first existed. It isn't until the past four or five years that things have really b…

Well, CSS have enough problems to probably suggest it failed.

It can work, but it failed for massive amount of people, it doesn't make it a successful paradigm.

Re: The Evolution of Scalable CSS

#58

Earlier quoted context omitted.

To avoid CSS inheritance & specificity, the "Cascading" part of CSS is the actual root of all evil. If you think about it, all the modern approaches to CSS (BEM, Atomic CSS, OOCSS) try to avoid it all cost.

To avoid CSS inheritance & specificity, the "Cascading" part of CSS is the actual root of all evil. The Cascade is CSS’a superpower. If only someone would come up with a way to write CSS to make the cascade work for you, not against you. Oh wait; that would be Inverted Triangle CSS. [1]: https://www.xfive.co/blog/itcss-scalable-maintainable-css-ar...

I'd like to believe that, but the industry has proven across the board that inheritance sucks. Cascading to me seems essentially inheritance, so I'm disillusioned, it's not a superpower, it's a liability

Re: The Evolution of Scalable CSS

#59
I really dislike Tailwind. As someone who knows how to work with CSS, it feels like a simple vendor-locked version of CSS you throw onto your codebase and pollute your DOM with divs that have 40 classes. From my experience, working on smaller projects and bigger CRMs, single file components with separate template, logic and style areas are the best when it comes to scalable components.
Post reply on HN