Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Macha
on Oct 23, 2022
|
parent
|
context
|
favorite
| on:
State of CSS
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
on Oct 23, 2022
[–]
On 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/
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
What's the benefit to:
over (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?