Skip to content

[css-anchor-position-1] Snapshotted scroll offset needs to consider both axis separately #9239

Closed
@xiaochengh

Description

@xiaochengh

(Originally filed as a Chrome bug)

From the current spec, an absolutely positioned element query el has a snapshotted scroll offset if:

Proposal: See #9239 (comment)

I propose removing the second condition, because:

  1. This condition is complicated to check. We need to go through both the base style and all the fallback styles
  2. It doesn't work with the new anchor-center alignment keyword, which can be used alone without any explicit anchor() functions
    • This 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
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions