File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -513,6 +513,38 @@ Identifying Scoping Roots and Limits</h4>
513
513
interpreting '':scope'' and ''&''
514
514
exactly as in [=scoped style rules=] .
515
515
516
+ <div class=example>
517
+ Authors can establish local scoping
518
+ for <{style}> elements by leaving out the <<scope-start>> selector.
519
+ For example:
520
+
521
+ <pre class=lang-html>
522
+ <div>
523
+ <style>
524
+ @scope {
525
+ p { color: red; }
526
+ }
527
+ </style>
528
+ <p>this is red</p>
529
+ </div>
530
+ <p>not red</p>
531
+ </pre>
532
+
533
+ That would be equivalent to:
534
+
535
+ <pre class=lang-html>
536
+ <div id="foo">
537
+ <style>
538
+ @scope (#foo) {
539
+ p { color: red; }
540
+ }
541
+ </style>
542
+ <p>this is red</p>
543
+ </div>
544
+ <p>not red</p>
545
+ </pre>
546
+ </div>
547
+
516
548
<div class=example>
517
549
[=Scoping limits=] can use the '':scope'' pseudo-class
518
550
to require a specific relationship to the [=scoping root=] :
You can’t perform that action at this time.
0 commit comments