@scope
Tighter control of selector reach
@scope (scope root) to (scope limit) {
…
}
<div>
<style>
@scope {
…
}
</style>
</div>
@scope (.Card) {
> header,
> footer {
background: hsl(none none none / 20%);
}
}
@scope (.light) {
:scope { background: white }
a { color: blue }
}
@scope (.dark) {
:scope { background: darkslategray }
a { color: lightblue }
}