csswg-drafts
csswg-drafts copied to clipboard
[css-anchor-position] When does anchor-scope "match" a name?
When an anchor-scope
is specified with a <dashed-ident>
, it scopes the name to that subtree when the anchor name is "matching". The problem is that this matching can be interpreted in at least three ways:
(Assuming that anchor-scope
is a tree-scoped reference, which is also not clear in the spec):
- It matches by the ident part of the name only, ignoring any tree-scope that would be associated with the name, or
- It matches by exact match of the ident part and the associated tree-scope, or
- It matches by some mechanism similar to dereferencing of tree-scoped references, where it's a match when the tree-scope of the anchor-scope-name is an inclusive ancestor of the tree-scope of the anchor query.
So we need to define exactly what "matching" means. For now I've implemented (2), but it's not obvious that gives the best behavior.