Closed
Description
(Originally filed as a Chrome bug)
From the current spec, an absolutely positioned element query el
has a snapshotted scroll offset if:
- there is a target anchor element given the default anchor specifier of query el
- and at least one anchor() function on query el refers to the same target anchor element
Proposal: See #9239 (comment)
I propose removing the second condition, because:
This condition is complicated to check. We need to go through both the base style and all the fallback stylesIt doesn't work with the newanchor-center
alignment keyword, which can be used alone without any explicitanchor()
functionsThis also suggests that the condition isn't future-proof. If we introduce new anchoring syntax in the future, this condition has to grow more complicated
Having a valid default anchor without actually positioning it against the anchor is a weird/incorrect usage. I don't see much value guarding against such usage