NEW 275184
CSS @starting-style element transitions in but does not transition out of DOM
https://bugs.webkit.org/show_bug.cgi?id=275184
Summary CSS @starting-style element transitions in but does not transition out of DOM
Andrew
Reported 2024-06-05 15:11:13 PDT
@starting-style doesn't apply transitions for removing elements. steps to reproduce: 1. the examples MDN gives here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#examples and here https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style 2. both the dialog element and popover element will apply the @starting-style and transition the element in, but when closing the popover or dialog the transition out does not apply. expected results: the element has the same transition applied to the @starting-styles defined when transitioning the element out. tested in - Version 17.5 (19618.2.12.11.6) - Safari Technology preview Release 195 (Safari 17.4, WebKit 19619.1.15.0.1) - iOS 17.5.1 Safari
Attachments
Radar WebKit Bug Importer
Comment 1 2024-06-12 15:12:13 PDT
Antoine Quint
Comment 3 2024-07-17 08:34:36 PDT
I tested the listed links with a 281013@main build and found the following: - https://codepen.io/argyleink/pen/qBGOamz: everything works the same as in Chrome Canary except for the dismissal of the <dialog> which moves to the top of the page as it fades out. - https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style: the "Show the popover" demo does not work, the popover animates in briefly but very quickly disappears. - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#examples: several demos don't seem to work, and it's hard to distinguish them within the page, but I think the issues are similar to the ones above. It's not clear to me that these issues all stem from the same problem, so we'll need to diagnose each issue and break them out in individual bugs as needed.
Tim Nguyen (:ntim)
Comment 4 2024-07-17 08:58:33 PDT
Some of the demos don't work before they refer to the `overlay` property in their CSS transition declaration, which WebKit doesn't implement.
Antoine Quint
Comment 5 2024-07-17 12:12:14 PDT
Clicking the "Add" button on https://codepen.io/argyleink/pen/qBGOamz does not animate the new element in.
Antoine Quint
Comment 6 2024-07-17 12:25:21 PDT
The `overlay` support / exit algorithm is tracked by bug 276727. I think this bug should focus on the "Add" button issue on https://codepen.io/argyleink/pen/qBGOamz.
Daniel
Comment 7 2024-09-30 06:39:50 PDT
Is the backdrop not animating in when clicking the button here (contrary to what it does in chrome) part of this bug? https://codepen.io/depict_daniel/pen/XWvmPee
caugner
Comment 8 2025-04-25 08:08:08 PDT
It looks like Safari 18.4 applies transitions for removing elements, i.e. the 2nd and 3rd example on the MDN page work as expected: https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style However, transitions are sometimes not applied when adding elements, see: https://jsfiddle.net/ymnujoLt/ (based on https://github.com/mdn/browser-compat-data/issues/25643)
Note You need to log in before you can comment on or make changes to this bug.