Re: [csswg-drafts] [css-anchor-1] Need ability to say "don't render" when anchor is off-screen (#7758)

> In all these cases, “hide” means that it (and all of its contents) are invisible (like ''visibility: hidden'') and do not contribute to scrollable overflow.

I think we should amend it to remove the part about not contributing to scrollable overflow. Here's why:

* Making it no longer contribute to scrollable overflow would require layout effect being in response to scroll or try-block layout+style effects, for the `no-overflow` and `anchors-visible` keywords. This would either be circular or introduce the potential for significant complexity in the layout and style engine.

* Anchored elements will need to avoid causing layout overflow for their containing blocks anyway, or else there would be useless scrollbars for that element even when the anchored element is not hidden.

I'm good with the `position-visibility ` proposal @fantasai wrote with this small change, and think it is easily implementable.



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


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

Received on Tuesday, 12 March 2024 23:06:06 UTC