It seems like CSS Layers are pretty much overlooked and underused. 馃 Are you using CSS Layers?
26 likes 13 replies
Replies
馃Bregtje馃 路 Apr 18
Huh no, didn鈥檛 know they exist..? So no, not yet but I鈥檓 very curious now! Does it work on every browser?
ArthurJ 路 Apr 19
Built a css library around them
Jake Lazaroff 路 Apr 18
yup, they鈥檙e pretty great for CSS resets and base styles
Juan Diego Rodr铆guez 路 May 19
Use them all the time in demos to separate the basic styling from what I want to show :)
Mary Baum 路 Apr 19
I think I want to know more. Course ultimately the CSS I use regularly will have to get supported in theme.json
Script Raccoon 路 Apr 19
I don't need them because every serious project uses a component framework anyway so that's that. Styles are scoped in Svelte and Vue.
Adam Argyle 路 May 1
Yep, for my whole site nerdy.dev
romainmenke 路 May 19
Actually stopped using them because we have full control over all styles in our projects. So we don't need the ability to push a group of styles into their own cascade layer. We found that specificity and source order are more nuanced tools giving us more detailed control.
benteh 路 Apr 18
they're scary!
Emmie P盲iv盲rinta 路 May 1
I just wish you could change where un-@layer'ed styles end up in the stack. With 3rd party styles, especially with css-in-js, you end up with styles taking precedence over all your @layer'ed styles, and there's nothing to do about it.
Steve Fulghum 路 Apr 19
I've tried integrating them into our CSS stack, but keep running into blockers. During my latest attempt, I found the CSS-in-JS solution from our third-party component library is effectively incompatible. I burned a lot of time writing plugin that would wrap its CSS output in a layer to no avail.
Manuel Matuzovi膰 路 May 19
Zell Liew 路 May 1
Yep. Pretty useful for overwriting stuff