19 ms·
I don't quite get what the big deal is with @scope: What's the benefit to: @scope(.card) { header { } } over .card header {
by Macha 4y ago
I don't quite get what the big deal is with @scope:
What's the benefit to:
@scope(.card) {
header {
}
}
over
.card header {
}
(or ".card > header", the article isn't quite clear which it is). Is it just the sass-style nesting? How does it differ from @nest then?
- rglover 4y agoOn the surface, it's very similar to the snippet you pasted and nesting but with a few exceptions. I asked the same and this breaks it down well: https://css-tricks.com/early-days-for-css-scoping/ https://css-tricks.com/early-days-for-css-scoping/