@@ -328,6 +328,13 @@ Effects of ''@scope''</h4>
328
328
* The [=style rules=] in an ''@scope'' <<stylesheet>>
329
329
are [=scoped style rules=] .
330
330
331
+ * The '':scope'' selector is defined to match
332
+ the ''@scope'' rule’s [=scoping root=] .
333
+ The ''&'' selector is defined to represent
334
+ the selector representing the [=scoping root=]
335
+ (the [=scope-start selector=] ),
336
+ or else '':scope'' if no selector was specified.
337
+
331
338
* The [=cascade=] prioritizes declarations
332
339
with a [=scope proximity|more proximate=] [=scoping root=] ,
333
340
regardless of specificity or source order
@@ -381,6 +388,17 @@ Scoped Style Rules</h4>
381
388
(This only applies to the [=subject=] ;
382
389
the rest of the selector can match unrestricted.)
383
390
391
+ * They accept a <<relative-selector-list>> as their prelude
392
+ (rather than just a <<selector-list>> ).
393
+ Such [=relative selectors=]
394
+ are relative to '':scope'' .
395
+
396
+ * Any selector in the <<relative-selector-list>>
397
+ that does not start with a [=combinator=]
398
+ but does [=contain the nesting selector=] or the '':scope'' selector,
399
+ is interpreted as a non-[=relative selector=]
400
+ (but the [=subject=] must still be [=in scope=] to match).
401
+
384
402
<h4 id="scope-limits">
385
403
Identifying Scoping Roots and Limits</h4>
386
404
@@ -394,12 +412,15 @@ Identifying Scoping Roots and Limits</h4>
394
412
of the stylesheet where the ''@scope'' rule is defined.
395
413
(If no such element exists,
396
414
then the [=scoping root=] is the [=root=] of the containing [=node tree=] .)
415
+ Any '':scope'' or ''&'' selectors in <<scope-start>>
416
+ are interpreted as defined for its outer context.
397
417
398
418
: Finding any [=scoping limits=]
399
419
:: For each [=scope=] created by a [=scoping root=] ,
400
420
its [=scoping limits=] are set to all elements
401
421
that are [=in scope=] and that match <<scope-end>> ,
402
- using the [=scoping root=] as the '':scope'' element.
422
+ interpreting '':scope'' and ''&''
423
+ exactly as in [=scoped style rules=] .
403
424
404
425
<div class=example>
405
426
The following selectors have the same specificity (0,0,1):
0 commit comments