Skip to content

Commit c331af6

Browse files
committed
[css-scoping-1][css-anchor-position-1] Clarify how anchor-scope works across tree scopes. #10526
1 parent 1bc3154 commit c331af6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

css-anchor-position-1/Overview.bs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ Values have the following meanings:
277277
to be in scope only for this element's descendants;
278278
and limits descendants to only match these [=anchor names=]
279279
to [=anchor elements=] within this subtree.
280+
The <<dashed-ident>> is a [=tree-scoped name=].
281+
282+
Note: Per [[css-scoping-1]],
283+
when two [=tree-scoped names=] are compared,
284+
they only match if they're from the same tree.
280285
</dl>
281286

282287
This property has no effect on [=implicit anchor elements=].

css-scoping-1/Overview.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,13 @@ Name-Defining Constructs and Inheritance</h3>
724724
(In other words, [=tree-scoped names=] "inherit" into descendant shadow trees,
725725
so long as they don't define the same name themselves.)
726726

727+
If two [=tree-scoped names=] are directly compared
728+
(for example, comparing an [=anchor name=] with an 'anchor-scope' ident),
729+
they are considered to match only if their identifiers match,
730+
<em>and</em> their [=root=]s match exactly.
731+
(If one has a [=root=] that's an ancestor of the other, for example,
732+
they <em>do not</em> match.)
733+
727734
<div class=issue>
728735
TODO: Fix all the at-rules that define global names,
729736
and the properties that reference them,

0 commit comments

Comments
 (0)