4 ms·
CSS Nesting will definitely be great to use in future projects, and I'm super happy to see it in vanilla CSS now. But to be honest? I think CSS was fun for a w
by CM30 3y ago
CSS Nesting will definitely be great to use in future projects, and I'm super happy to see it in vanilla CSS now.
But to be honest? I think CSS was fun for a while, simply because all the stuff mentioned in the intro of the article removed many of its pain points. Flexbox, Grid, the is selector, cascade layers... all of this stuff just lets you simplify your CSS down to something that actually makes sense rather than a big ball of mud and browser hacks.
I will say however that I've never really got to use those fancy colour properties though. Feels like every time I've worked on a website or app for any remotely large company, the design team had some set in stone idea about what the branding should be and would accept zero deviation from that in terms of what colours could be used for text, backgrounds, etc.
- YoshiRulz 3y agoI'm sure Google's Material 3 """designers""" will make use of the built-in colour mixing if it reduces payload size.
- FireInsight 3y agoWhat is """"designers""""? I think MD3 looks pretty good compared to googles earlier attempts...
- YoshiRulz 3y agoPerhaps it's nostalgia, but I feel like the initial "material" concept—UI components being like stacked paper—was better realised in 1 (and 2) than in 3. It wasn't the first minimalist design framework, but the spec was notably thorough in a way the new one isn't. I also preferred the barely-rounded corners and standardised colour palettes, but that's more a matter of taste.
- ForkMeOnTinder 3y agoI had the opposite thought -- I bet the new color mixing will increase payload size. Which of these would you rather send over the wire? A) color-mix(in srgb, var(--primary-color), white 50%) B) #abcdef For me to give up scss, there needs to be a minifier that calculates colors ahead of time and emits them plain, the way scss does. (Maybe there already is, who knows)
- TylerE 3y agoDifference might well be a lot less than you think after compression. XML(like) things compress almost embarrassingly well.
- coev 3y agopostcss already does this https://preset-env.cssdb.org/blog/postcss-color-mix-function/ https://preset-env.cssdb.org/blog/postcss-color-mix-function...
- egeesin 3y ago[dead]
- qingcharles 3y agoThat will make zero difference to site performance. If I didn't have uBlock running, half the sites on the Internet have 100MB+ payloads now. You could save more than those 50 compressed bytes of text by just optimizing one image on your site :) I beat myself up about performance issues like that all the time and have to catch myself to go do something more useful instead.