Skip to content

Commit 81c1880

Browse files
andruudmirisuzanne
andauthored
[css-cascade-6] Specify how name-defining at-rules behave in @scope (w3c#8462)
Resolves w3c#6895. Co-authored-by: Miriam Suzanne <miriam@oddbird.net>
1 parent 0a13424 commit 81c1880

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

css-cascade-6/Overview.bs

+8-2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ Scoped Styles</h2>
251251
up to any [=scoping limit=] elements. [=Scoping limit=] elements and
252252
their descendants are not included in the [=scope=].
253253

254+
[=Pseudo-elements=] cannot be [=scoping roots=] or [=scoping limits=];
255+
they are invalid both within <<scope-start>> and <<scope-end>>.
256+
254257
Note: In contrast to [[CSS-SCOPING-1#shadow-dom|Shadow Encapsulation]],
255258
which describes a persistent one-to-one relationship in the DOM
256259
between a [=shadow host=] and its nested [=shadow tree=],
@@ -476,8 +479,11 @@ Scoping Styles: the ''@scope'' rule</h4>
476479
are [=scoped selectors|scoped by=]
477480
the selectors of the outer one.
478481

479-
[=Pseudo-elements=] cannot be [=scoping roots=] or [=scoping limits=];
480-
they are invalid both within <<scope-start>> and <<scope-end>>.
482+
Global, name-defining [=at-rules=]
483+
such as ''@keyframes'' or ''@font-face'' or ''@layer''
484+
that are defined inside ''@scope'' are valid,
485+
but are not scoped or otherwise affected
486+
by the enclosing ''@scope'' rule.
481487

482488
<h4 id="scope-combinator">
483489
Scoped Descendant Combinator</h4>

0 commit comments

Comments
 (0)