Re: [csswg-drafts] [css-anchor-1] Can't anchor one popover to another (#8165)

I made a PR for the idea.

Btw, when there are multiple anchors with the same name, maybe we should return the last acceptable anchor instead of the first one (as we currently do)?

This allows easy chaining of anchor positioned elements with the same name, a case @tabatkins mentioned in a chat:

```html
<style>
.anchored {
  anchor-name: --a;
  position: absolute;
  top: anchor(--a bottom);
}
</style>
<div class=anchored></div>
<div class=anchored></div>
<div class=anchored></div>
<div class=anchored></div>
```

Each `.anchored` will be anchored below the previous one if we use the last acceptable anchor instead of the first one.

-- 
GitHub Notification of comment by xiaochengh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8165#issuecomment-1528308913 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 29 April 2023 00:31:55 UTC