Closed Bug 1923758 Opened 14 days ago Closed 13 days ago

Implement support for `anchor()`

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1909332

People

(Reporter: dshin, Unassigned)

References

(Blocks 1 open bug)

Details

anchor() resolves to <length>, offsetting w.r.t. the anchor element, depending on the keyword specified.
e.g. left: anchor(--foo left); top: anchor(--foo bottom); is akin to position-anchor: --foo; position-area: bottom center, positioning-wise.
Note that the function, unlike position-area:

  • Allows referring to an anchor other than its default anchor.
  • Has no impact on sizing.
  • Can specify percentage value, e.g. anchor(20%) resolves 20% from the start of the default anchor. This can allow the query element to "escape" its containing block.

The function can also specify a fallback of type <length-percentage> as per spec; however, if this will also allow recursive anchor() is currently debated.

The function can be also used in calc().

Depends on: 1915021
Blocks: 1923759
Blocks: 1923763
No longer blocks: 1923759, 1923763
Depends on: 1923759, 1923763
Depends on: 1923764
No longer depends on: 1915021
No longer depends on: 1923759
No longer depends on: 1923763
Status: NEW → RESOLVED
Closed: 13 days ago
Duplicate of bug: 1909332
Resolution: --- → DUPLICATE
No longer depends on: 1923764
You need to log in before you can comment on or make changes to this bug.