Skip to content

[css-scroll-anchoring] Does gaining an abspos descendant suppress anchoring? #13563

@smfr

Description

@smfr

The spec says:

Any change to the computed value of the position property on any element within the scrollable element (or document), such that the element becomes or stops being absolutely positioned.

This is pretty ambiguous; it doesn't say what happens if an abspos child is added (appendChild()) or appears via a change in the display property.

Firefox treats this as a suppression trigger, Chrome does not. Test at https://codepen.io/smfr/pen/zxKxBWe

cc @emilio

I would think that gaining positioned descendants is common enough that having this suppress anchoring on the document would be annoying.

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