Skip to content

Commit

Permalink
[css-anchor-1] Fix the note to be more accurate, given the fix to tre…
Browse files Browse the repository at this point in the history
…e-scoping. #7916
  • Loading branch information
tabatkins committed Oct 20, 2022
1 parent 80cce94 commit 9065544
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions css-anchor-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,16 @@ might not be capable of anchoring the positioned element.
ensuring there is no possibly circularity
in anchor positioning.

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

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

0 comments on commit 9065544

Please sign in to comment.