Re: [csswg-drafts] [css-position-4] Is the overlay property ready to ship? (#8730)

> This doesn't quite explain how this works relative to transitions, afaik, removing from the top layer kills the transition, so this means update the rendering will kill all pending removal transitions for top layer rendering at least, so this makes me question whether this model actually works. This is the main part I wanted clarification about.

Yes, actually removing an element from the top layer bypasses anything that `overlay` might do. That's why access to the top layer is now gated behind several algorithms that "do the right thing" - you *can* modify the top layer directly still, but if you "request removal" it will just remove the `overlay` rule (reverting it to the default `none`, but possibly triggering a transition that keeps it as `auto` for a bit) and put it in the pending removals list. Then in "process top layer removals" we check if the element is both (a) pending removal, and (b) `overlay:none` before actually removing it  from the top layer.

> In general the spec could use more precision around the role the overlay property actually plays in top layer rendering. That would also help understanding things around transition timing as well.

Hm, what else do you want detail on in there? Happy to expand on this as necessary.

> From reading the spec right now, adding to the top layer will trigger right away "rendered in the top layer" style adjustments, so this makes me question what the overlay property is useful for.

Correct, as soon as it's in the top layer list, it renders as part of the top layer (and stops doing so as soon as it's not in the list).

The 'overlay' property exists to allow authors to signal they want to delay removal from the top layer for some amount of time, by adding a transition. That's all it does.

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


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

Received on Friday, 28 April 2023 17:42:27 UTC