8000 [css-anchor-position] Absolutely positioned element does not find fixed anchor · Issue #10419 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-anchor-position] Absolutely positioned element does not find fixed anchor #10419

@RWDavid

Description

@RWDavid

I am currently creating small test cases to solidify my understanding of the anchor positioning spec.

Here is one such test case that utilizes a position: fixed anchor and a position: absolute anchored element.

<style>
  .anchor {
    anchor-name: --anchor-el;
    position: fixed;

    background: blue;
    width: 150px;
    height: 150px;
    border: 2px solid white;
  }

  .anchee {
    position: absolute;
    position-anchor: --anchor-el;
    inset-area: end;

    width: 100px;
    height: 100px;
    background: red;
    border: 2px solid white;
  }
</style>

<div style="position: relative;">
    <div class="anchor"></div>  
    <div class="anchee"></div>
</div>

It seems like the anchor is an acceptable anchor element, but the anchored element does not seem to accept that element as an anchor (at least on Chrome Canary version 127.0.6532.0).

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

      0