Re: [csswg-drafts] [css-animations-2, css-transitions-2] Entry and exit animations for top-layer elements (#8189)

All the top-layer definitions, along with the 'overlay' property, are now in the Position 4 spec: <https://drafts.csswg.org/css-position-4/#top-layer>

There have been several minor changes from the text as it existed in Fullscreen.

* the 'overlay' property now exists, which is automatically set by the UA (and *only* the UA) to reflect whether the element is in the top layer or not, but which can be affected by author-level transitions to keep something in the top layer temporarily, while an exit animation is playing (fading its opacity, etc). 'overlay' has transition semantics similar to 'visibility', where all intermediate progress values map to 'auto' (rather than flipping at half-progress)
 * as part of this, the "pending top layer removals" list has been added, so other algorithms can tell whether something is *actually* still in the top layer or just pending removal due to a transition; if it's pending they can go ahead and act as if it wasn't there.
* modifying the top layer has been abstracted behind a couple of algorithms. They're generally light-touch, with two major changes:
 * unless you explicitly ask for immediate removal, removal instead just adds it to the pending removal list, and it's removed for real during HTML's Update The Rendering. This ensures that transitions added at the same time will get processed and can have an effect on the 'overlay' property, possibly delaying the *actual* removal. (Immediate removal should only be used for security-related things, or when CSS isn't relevant, like if the element has been removed from the document.)
 * adding something to the top layer that's already in the top layer (and not pending removal) is now considered a spec error, enforced by an assertion. (Previously, it just shifted the element to the end of the top layer, so it rendered topmost.) Now that several features play in the top layer, their interactions are non-trivial, and should be handled more explicitly by each feature. This will require more spec work, probably mostly in the other features' specs.

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


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

Received on Thursday, 13 April 2023 19:47:38 UTC