Live data from Hacker News

State of CSS

web.dev

141–150 of 234 posts

Re: State of CSS

#141
post #139

What's the purpose of having 4 linear color spaces (srgb-linear, xyz, xyz-d50, xyz-d65) for interpolation? Linear interpolation is exactly the same in any linear space. Indeed, in provided gradient examples these 4 look the same.

Because they're (idealy) not linear, I'd assume. Gamma correction[0] is an exponential-like function. Hence, sRGB vs "sRGB linear". Despite what many people think, sRGB color #808080 is not 50% the brightness of #ffffff, but about 75%. All because our eyes are non-linear.

Color math is a massive rabbit hole that deserves its own "things programmers believe about..."

[0]: https://en.wikipedia.org/wiki/Gamma_correction

Re: State of CSS

#142
post #124

Earlier quoted context omitted.

Did you even bother to look which browser implemented the features first? Will you update your priors based on what you find?

I'm talking about the growth of features in general. Calm down no need to be so aggressive.

No need to be so conspiratorial either. Generally features make it in because they improve developers' experience.

Re: State of CSS

#143
post #138

It's so interesting, these waves of CSS improvements. Before the flexbox/grid arrival, there were years of near-zero progress. The flexbox/grid release, uniquely coordinated across browsers (for once), was an excellent milestone, but not really a movement. These last 2 years though feel almost like a revolution in comparison to CSS's history. Somebody is pushing very hard. These are some very serious improvements tha…

It's so annoying to me that there's one browser that's holding everyone back. They also make it so that no one can use anything but their browser engine on mobile phones so they're harder to ignore.

Re: State of CSS

#144
post #143
post #138

It's so interesting, these waves of CSS improvements. Before the flexbox/grid arrival, there were years of near-zero progress. The flexbox/grid release, uniquely coordinated across browsers (for once), was an excellent milestone, but not really a movement. These last 2 years though feel almost like a revolution in comparison to CSS's history. Somebody is pushing very hard. These are some very serious improvements tha…

It's so annoying to me that there's one browser that's holding everyone back. They also make it so that no one can use anything but their browser engine on mobile phones so they're harder to ignore.

Reading between the lines, it seems like you're suggesting Safari is that browser holding everyone back. The Compatibility section in this article doesn't seem to support that.

Re: State of CSS

#145

Earlier quoted context omitted.

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/

There may be layout tests for flexbox (I haven't looked into them, because I don't care about them as much as normal flow) but there are basically no layout tests for CSS 2.1 that aren't fully manual.

So basically for 25 years, as far as I understand, no one said, hey given a set of known layout constraints and rasterization parameters, let's create automated tests.

For 25 years.

Maybe I'm wrong, but I keep looking for these tests and the ones that exist for normal flow are a nonstarter.

Re: State of CSS

#146
post #143
post #138

It's so interesting, these waves of CSS improvements. Before the flexbox/grid arrival, there were years of near-zero progress. The flexbox/grid release, uniquely coordinated across browsers (for once), was an excellent milestone, but not really a movement. These last 2 years though feel almost like a revolution in comparison to CSS's history. Somebody is pushing very hard. These are some very serious improvements tha…

It's so annoying to me that there's one browser that's holding everyone back. They also make it so that no one can use anything but their browser engine on mobile phones so they're harder to ignore.

When it comes to CSS Safari is rarely behind, and often ahead.

When it comes to Chrome-only non-standards Safari is right where it needs to be: not implementing this bullshit.

Re: State of CSS

#147

Earlier quoted context omitted.

: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.

:is also has tighter specificity then a nested selector. which is a footgun for sure. However you can use :where instead, which is basically just :is without this footgun.

there's a subtlety missing: :is() selects the highest specificity from the selector list while :where() sets specificity to 0 for anything in the selector list. this leaves out the (admittedly narrow) case where you want the lowest matching specificity (in case 2+ selectors match) rather than just 0, which is probably what most folks would expect, just as we would tend to expect selector lists to be forgiving (following the principle of least surprise).

Re: State of CSS

#148
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.

Constraint-based layouts where proposed to w3c in 1999. They were rejected because people thought they would be too resource-intensive for the time.

Don't forget, the core of HTML and CSS until this day basically relies on "we can lay everything and display it in a single pass".

Double pass (for tables) didn't appear in standards until 2001 if I remember correctly (but won't be able to find).

And then you have the IE-era draught of no features.

Re: State of CSS

#149
post #124

Earlier quoted context omitted.

I'm talking about the growth of features in general. Calm down no need to be so aggressive.

No need to be so conspiratorial either. Generally features make it in because they improve developers' experience.

They are mostly one-off features that don't create a coherent whole. See what Figma has to say about this: https://www.figma.com/blog/building-a-professional-design-to...

Re: State of CSS

#150
post #143
post #138

It's so interesting, these waves of CSS improvements. Before the flexbox/grid arrival, there were years of near-zero progress. The flexbox/grid release, uniquely coordinated across browsers (for once), was an excellent milestone, but not really a movement. These last 2 years though feel almost like a revolution in comparison to CSS's history. Somebody is pushing very hard. These are some very serious improvements tha…

It's so annoying to me that there's one browser that's holding everyone back. They also make it so that no one can use anything but their browser engine on mobile phones so they're harder to ignore.

I like how you need a mac to test safari and how the ios animated address bar destroys any easy layout for applications.
Post reply on HN