Skip to content

[css-anchor-position] "determine position fallback styles" should be guarded by "If the current style overflows" #12818

@dshin-moz

Description

@dshin-moz

(Editorial, probably)

Strictly reading spec:

Fallbacks are evaluated via interleaving...

These modified styles are applied to the element via interleaving

... Through a full layout pass...

During a full layout pass, once a box has determined its fallback styles [...]

... Then at RO time, we determine position fallback styles (After potentially setting/removing last successful position option)

Then, determine position fallback styles for el [...]

... But then, there's no wording about checking if the current style overflows the cb. Such check is made in the loop...

  1. If el rect is not fully contained within cb rect, continue.

... But that's skipped for the last successful position option.

If option is currently abspos’s last successful position option, continue.

So the spec makes it sound like if we have a positioned element that does not overflow without fallback, and has an option that also would not overflow, it would take the fallback option after RO events fire. Similarly, if we the non-fallback option overflows, but there are two fallback options that would not overflow, it sounds like the second option would be taken after RO events fire.

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