Live data from Hacker News

Is there too much CSS now?

css-tricks.com

1–10 of 125 posts

Re: Is there too much CSS now?

#2
The css tricks website definitely has always had way too much css. Imo a very jarring user experience that often had me hitting the back button and clicking the adjacent w3schools article for whatever "css trick" I was searching for.

Re: Is there too much CSS now?

#4

This article seems to think the CSS spec is too big, which I don’t think is the case. We should be able to access lots of rendering options via CSS. But CSS stylesheets are definitely way too big.

Is disagree. I have no idea how to do CSS after five years of web programming, except using trial and error.

Reading "what is new in CSS3" did not help much, but at least flexbox means I don't use howtocenterincss.com any more; while grids became my go-to for all problems, with four attributes that do something about margins and centering but I ignore them out of a lack of memorization.

Re: Is there too much CSS now?

#5

This article seems to think the CSS spec is too big, which I don’t think is the case. We should be able to access lots of rendering options via CSS. But CSS stylesheets are definitely way too big.

The shadow DOM in web components helps with this a lot. (size/complexity of stylesheets)

Re: Is there too much CSS now?

#7
I don't think so. New CSS features are pretty low overhead to learn, and save me a ton of time. I used to use all those black magic tricks they mention at the beginning of the article, and it was way harder to create layouts back then. Not even close. Adding more features has mostly just made it easier, so it's worth the tradeoff.

Re: Is there too much CSS now?

#8
On the upside, all the basic properties and selectors work now across browsers. You don't need to know about hasLayout, mysterious 3px margins or inline-table hacks. If you don't follow the latest hotness of the week, you can develop in one browser, then just quickly check in a couple of others, and 99% of the time it's fine.

Re: Is there too much CSS now?

#9
There is a lot of CSS now…but so many of the recent additions have been useful. Really useful. Like, solves real-world problems, easy to understand, on their way to being very well-supported.

For example…

…Container Queries. (https://www.smashingmagazine.com/2021/05/complete-guide-css-...)

…Cascade Layers. (https://css-tricks.com/css-cascade-layers/#browser-support-a...)

…the :has() selector. (https://www.bram.us/2021/12/21/the-css-has-selector-is-way-m...)

Re: Is there too much CSS now?

#10
CSS has become like a scripting language now. You can do things like nested CSS[0], keyframe animations[1], calc operations[2], etc

It has become very JavaScript-like and this is why I always try to see if I can do something in CSS first before I resort to JS.

[0] https://www.w3.org/TR/css-nesting-1/

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes

[2] https://developer.mozilla.org/en-US/docs/Web/CSS/calc

Post reply on HN