pepelsbey, You can scope styles inside of the parent with a <style> and a @scope rule 😳
<div>
<style>
@scope {
p { color: red }
}
</style>
<p>this is red</p>
</div>
<p>not red</p>See the CSS Cascading and Inheritance L6 draft
https://drafts.csswg.org/css-cascade-6/#example-52419898It’s not just a fantasy, it already works in Chrome Canary. Thanks to @kizu for the tip!
Add comment