Live data from Hacker News

State of CSS

web.dev

101–110 of 234 posts

Re: State of CSS

#101

I find most of this useless/overcomplicated. > Cascade layers Feels like we only need this because cascading works less and less well once you start to include multiple frameworks or pieces thereof. At some point people find themselves in a jungle of !important. If you keep the cascade small and clean, you'll most likely not need that. > Container queries Probably the designs I have to implement are not complicated e…

Your comment reads like a lot of complaining by someone who doesn’t do a whole lot of CSS.

You’re complaining about the mere availability of color functions, that alone kills the rest of the comment.

Re: State of CSS

#102
post #40

Great overview. I'm always excited by newer features to CSS that make older JS-only methods obsolete. I've also grown CSS-tooling fatigued after using SASS and PostCSS plugins for years. I've recently gone back to only using vanilla CSS on personal projects and while there are niceties I do miss (nesting) it's refreshing not having to deal with config files or waiting for stuff to compile.

The sweet spot for me is Vite, which comes with PostCSS built-in, and the nesting plug-in which follows the CSS spec. Vite takes care of the boring stuff, I can write vanilla CSS with nested declarations in it, and it just works.

But what Vite didn't have to do anything because CSS already comes with nesting? CSS nesting was proposed over eleven years ago, and is only today finally making it into a single browser, behind an experimental flag. Three major preprocessing languages were invented and two of those (mostly) died off again in the mean time. We shouldn't need preprocessing here, we should have had nesting ten years ago =)

Re: State of CSS

#103
post #7

Great overview. I'm always excited by newer features to CSS that make older JS-only methods obsolete. I've also grown CSS-tooling fatigued after using SASS and PostCSS plugins for years. I've recently gone back to only using vanilla CSS on personal projects and while there are niceties I do miss (nesting) it's refreshing not having to deal with config files or waiting for stuff to compile.

Actual nesting is on the way [0], but for now you can already use :is() [1] in many cases. [0]: https://blog.openreplay.com/modern-css-selectors/ [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/:is

:is() exclusively reduces nesting if your nest produces a single rule, which is the least common situation and is generally dealt with by just duplicating the selector rather than nesting.

Re: State of CSS

#104
Am I the only one who looks at the example color gradients and thinks the new ones just look... worse? The sRGB one is the only one that looks perceptually uniform, and is probably the only one I'd feel comfortable putting text on top of, and the bottom two have really aggressive and distracting banding. That makes this especially concerning:

>The default color space also changes to LCH instead of sRGB.

Since LCH is the worst one to my eyes.

Is this just an issue with my monitor?

Re: State of CSS

#105
post #78

Interesting to see a lot of negative responses here. I'm quite excited for a large amount of these items. @container queries are going to help a ton in making components more reusable - components that react to their own size rather than the browser size have been needed for a long time, and currently the only way to really do it is with the javascript observer api, which comes with huge performance tradeoffs. Color-…

I'm only negative that some of these, especially flexbox/grid, weren't in the standard from the start. Especially after the committee crapped on HTML tables so hard. Viewport units are another part of the standard that's about 24 years overdue at this point.

crapping on tables was arguably correct. flexbox and grid allow for responsive designs (work on phone and desktop). Table based layouts do not.

Re: State of CSS

#106
Grid is crap. Html tables were much easier to handle, they should have gone with tags instead (since tables have been declared toxic). The cryptic nature of the grid layout units is something that seems deliberately obnoxious

who the f thinks this is readable: grid-template-rows: auto 40px 1fr 80px;

Re: State of CSS

#107

Earlier quoted context omitted.

I'm only negative that some of these, especially flexbox/grid, weren't in the standard from the start. Especially after the committee crapped on HTML tables so hard. Viewport units are another part of the standard that's about 24 years overdue at this point.

crapping on tables was arguably correct. flexbox and grid allow for responsive designs (work on phone and desktop). Table based layouts do not.

Crapping on tables is fine. Offering no replacement was not.

Re: State of CSS

#108
post #106

Grid is crap. Html tables were much easier to handle, they should have gone with tags instead (since tables have been declared toxic). The cryptic nature of the grid layout units is something that seems deliberately obnoxious who the f thinks this is readable: grid-template-rows: auto 40px 1fr 80px;

Tables were terrible.

But there is the middle ground of flexbox... honestly flexbox seems to work in nearly everything I use.

Re: State of CSS

#109
post #106

Grid is crap. Html tables were much easier to handle, they should have gone with tags instead (since tables have been declared toxic). The cryptic nature of the grid layout units is something that seems deliberately obnoxious who the f thinks this is readable: grid-template-rows: auto 40px 1fr 80px;

[deleted]

Re: State of CSS

#110

I find most of this useless/overcomplicated. > Cascade layers Feels like we only need this because cascading works less and less well once you start to include multiple frameworks or pieces thereof. At some point people find themselves in a jungle of !important. If you keep the cascade small and clean, you'll most likely not need that. > Container queries Probably the designs I have to implement are not complicated e…

10 years ago people said the same about the CSS3 changes. I find most of this useless/overcomplicated. Who needs rounded corners? I like my png slicing. And what are box shadows anyway? There's nothing flexbox can do that I can't achieve with tables. Transitions are bad, transparency is for Apple fanbois, animations the devil's farts, and don't get me started on media queries. Phones should remain Nokia bricks. This…

I can only remember that we applauded CSS3. Rounded corners and shadows were crucial to implement the design of the day. Animations and transitions were lovely. It was an exiting time to make stuff.
Post reply on HN