Re: [csswg-drafts] [css-position] Ability to set a positioned element's containing block to another element (#5952)

> An HTML attribute might be a simpler solution to implement, but it violates separation of concerns, as well as the Extensible Web Manifesto (by adding new magic that cannot be specified in CSS), so I'm really hoping there is a set of constraints that would enable a CSS solution to this.

If the anchoring state is ephemeral, which is what I am proposing, then separation of concerns is not violated. I view it as similar to how the `<dialog>` open state, or whether a `<select>` or `<details>` is open, is not in CSS; nor does CSS have direct access to the top layer.

Regarding the Extensible Web Manifesto: right now the developer doesn't have programmatic access to top layer functionality. Perhaps there are use cases for doing that, but before doing it we should have strong use cases, and not do it just because extensibility. The reason is that the top layer is an important way the browser can coordinate certain UX in order to guarantee visibility/accessibility to the user.

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


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

Received on Thursday, 18 February 2021 18:19:30 UTC