5 ms·
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
by jjcm 4y ago
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-mix() is another item I've been wanting for some time, not because I need to mix things like red + blue, but because we've needed a native way to add opacity to css variables for a long time now. Having opacity be independent means we can have a robust design system that doesn't expand exponentially, while still providing opacity levels when needed.
Masonry layouts will greatly simplify a very common use case, color level 4 and 5 will make the web more dynamic and beautiful, and loosely typed properties will help add fallbacks. Definitely excited for these changes.
- 9dev 4y agoI mean, you already could store Color tuples in CSS variables: --color-primary: 172,250,83; background: rgba(var(--color-primary), 0.4); But I agree, that isn’t very intuitive.
- wwweston 4y agoAFAICT a lot of the negativity comes from developers who want to work at a component UI Kit level you can find in native dev but don't find libs/kits that accommodate this well. I don't think this is a failure of CSS -- I think CSS has turned out to be brilliant with some blind spots and part of the most spectacularly flexible UI layer that's ever been created. But it works at a lower level and leaks easily and that plus some cultural factors has generally pulled people towards a below-component development focus lots of devs would rather have abstracted away. Container queries are one of several things that can move the dev culture more towards component level.
- jandrese 4y agoI'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.
- asiachick 4y agocrapping on tables was arguably correct. flexbox and grid allow for responsive designs (work on phone and desktop). Table based layouts do not.
- dmitriid 4y agoConstraint-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.
- deleted 4y ago[deleted]
- hot_gril 4y agoWell the amount of lag my max-spec 2019 MBP incurred loading that webpage didn't bode well.