Skip to content

Commit 9065544

Browse files
committed
[css-anchor-1] Fix the note to be more accurate, given the fix to tree-scoping. #7916
1 parent 80cce94 commit 9065544

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

css-anchor-1/Overview.bs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,16 @@ might not be capable of anchoring the positioned element.
354354
ensuring there is no possibly circularity
355355
in anchor positioning.
356356

357-
Note: Anchor names are scoped to the tree the anchor element is in;
358-
if the querying element is in a different [=shadow tree=],
359-
they won't find each other.
360-
[=Implicit anchor elements=] aren't necessarily limited in the same way,
361-
but that might vary depending on the feature assigning the implicit anchor element.
357+
Note: An 'anchor-name' defined by styles in one [=shadow tree=]
358+
won't be seen by [=anchor functions=] in styles in a different [=shadow tree=],
359+
preserving encapsulation.
360+
However, <em>elements</em> in different [=shadow trees=]
361+
can still anchor to each other,
362+
so long as both the 'anchor-name' and [=anchor function=]
363+
come from styles in the same tree,
364+
such as by using ''::part()'' to style an element inside a shadow.
365+
([=Implicit anchor elements=] also aren't intrinsically limited to a single tree,
366+
but the details of that will depend on the API assigning them.)
362367
</div>
363368

364369
An element can also have an <dfn export>implicit anchor element</dfn>,

0 commit comments

Comments
 (0)