Live data from Hacker News

State of CSS

web.dev

111–120 of 234 posts

Re: State of CSS

#111
post #3

Does anyone else feel like CSS has jumped the shark a bit? https://web.dev/state-of-css-2022/#accent-color Sure it's a "nice to have" but it bloats the spec? Look at the current actual implementation: https://web.dev/accent-color/#guaranteeing-contrast chrome and firefox already tint differently... How is this better than a good ol CSS variable and leaving it up to the designer to manage? Sure http://dowebsitesneedto…

[deleted]

Re: State of CSS

#112

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…

[deleted]

Re: State of CSS

#113
post #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.

flex is ok, and actually fills a need, but can it be used to make e.g. a chat layout?

i don't agree btw. grid is voodoo declarations that is worse than tables. pretty much need to stackoverflow to do anything

Re: State of CSS

#114
post #4

Make no mistake: dialog element is there only because browsers (and Chrome, first and formost) want to remove alert/prompt. dialog was so problematic that the same people that are now promoting it were in favor of removing it entirely. Literally none of the issues were solved, but now it's a great new element that we all should use.

Dialog is fine, but what I’m most excited is the upcoming Popup API. The finest part is that “the most recent popup gets the top-most layer”. You never have to fight z-index again because popups now live in a compositing layer outside the document itself (even though they’re still part of it), akin to position:fixed but without the conflicts.

Re: State of CSS

#115
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-…

[deleted]

Re: State of CSS

#116

Can't believe paged media isn't really supported yet. Trying to do anything like line numbers for legal documents or page numbers is an absolute nightmare.

Page media has been supported for decades. Line numbers aren’t strictly related to page media. It’s hard to complain about the lack of in-depth support for a media that isn’t meant to display “the web”.

I do agree that it could be better. They have been adding print-related features though, at least I remember some in CSS3. CSS Colors Level 4 includes cmyk functions.

Re: State of CSS

#117
post #6

I think I don't need the 2022 version, but the 2021 version. Or even the 2012 version, lol! I still prefer to use tables to layout my websites. Question: Say I want a layout that has a top row, a middle row and a bottom row. Each row gets 33% of the screen space. Unless the content does not fit. Then the row should expand to the content. Here is the table version: https://jsfiddle.net/vg2ey8r9/ How do you do that wit…

With grid: https://jsfiddle.net/1oghfL9s/

Re: State of CSS

#118

CSS keeps getting larger and larger which I think on its face is actually fine, since all of the standards are extended modules. So if you think about it that way, as an implementor you can choose which standards you want to incorporate and have total coverage for particular parts of the spec. But the state of CSS for implementors is still abysmal, in my opinion, and I'd like to see more of the spec formally defined…

If you want CSS to be the same across browsers then help implement CSS tests and file bugs

https://www.w3.org/Style/CSS/Test/Overview.en.html

https://web-platform-tests.org/

better specs are great, but tests will actually find the edge cases and lead to more convergence.

Re: State of CSS

#119
post #6

I think I don't need the 2022 version, but the 2021 version. Or even the 2012 version, lol! I still prefer to use tables to layout my websites. Question: Say I want a layout that has a top row, a middle row and a bottom row. Each row gets 33% of the screen space. Unless the content does not fit. Then the row should expand to the content. Here is the table version: https://jsfiddle.net/vg2ey8r9/ How do you do that wit…

With grid: https://jsfiddle.net/1oghfL9s/

does not expand the table if the content doesnt fit

https://i.imgur.com/K1gOKGL.png

Re: State of CSS

#120

Earlier quoted context omitted.

As someone who's recently been working on an implementation of CSS Grid, and reading through a lot of CSS specs, I completely agree. There's a lot that isn't in the specs. The CSS Grid one isn't even that bad, but the spec for "flow layout" (block and inline) looks like a complete mess. An HTML5 moment for CSS would be very welcome.

Yes! You know exactly what I'm talking about!! I'm hysterical about the state of affairs for these exact sorts of things, but comparatively almost no one is an implementor, so most people have no idea how bad it can be.

IIRC the way someone reimplemented flexbox was to take the layout tests and iterate until their implementation passed.

https://yogalayout.com/

Post reply on HN