<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>275184</bug_id>
          
          <creation_ts>2024-06-05 15:11:13 -0700</creation_ts>
          <short_desc>CSS @starting-style element transitions in but does not transition out of DOM</short_desc>
          <delta_ts>2025-12-13 03:28:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari 17</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=276727</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew">asg86260</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>caugner</cc>
    
    <cc>graouts</cc>
    
    <cc>harald</cc>
    
    <cc>koivisto</cc>
    
    <cc>me</cc>
    
    <cc>ntim</cc>
    
    <cc>random_n0body</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2039965</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew">asg86260</who>
    <bug_when>2024-06-05 15:11:13 -0700</bug_when>
    <thetext>@starting-style doesn&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041071</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-06-12 15:12:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/129713289&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046655</commentid>
    <comment_count>2</comment_count>
    <who name="Harald">harald</who>
    <bug_when>2024-07-16 23:47:08 -0700</bug_when>
    <thetext>Here is another example: https://codepen.io/argyleink/pen/qBGOamz

Featured in this article: https://nerdy.dev/using-starting-style-and-transition-behavior-for-enter-and-exit-stage-effects#exit-stage</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046736</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-07-17 08:34:36 -0700</bug_when>
    <thetext>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 &lt;dialog&gt; which moves to the top of the page as it fades out.

- https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style: the &quot;Show the popover&quot; 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&apos;t seem to work, and it&apos;s hard to distinguish them within the page, but I think the issues are similar to the ones above.

It&apos;s not clear to me that these issues all stem from the same problem, so we&apos;ll need to diagnose each issue and break them out in individual bugs as needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046741</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-07-17 08:58:33 -0700</bug_when>
    <thetext>Some of the demos don&apos;t work before they refer to the `overlay` property in their CSS transition declaration, which WebKit doesn&apos;t implement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046770</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-07-17 12:12:14 -0700</bug_when>
    <thetext>Clicking the &quot;Add&quot; button on https://codepen.io/argyleink/pen/qBGOamz does not animate the new element in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046778</commentid>
    <comment_count>6</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-07-17 12:25:21 -0700</bug_when>
    <thetext>The `overlay` support / exit algorithm is tracked by bug 276727.

I think this bug should focus on the &quot;Add&quot; button issue on https://codepen.io/argyleink/pen/qBGOamz.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064226</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel">random_n0body</who>
    <bug_when>2024-09-30 06:39:50 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113115</commentid>
    <comment_count>8</comment_count>
    <who name="">caugner</who>
    <bug_when>2025-04-25 08:08:08 -0700</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165620</commentid>
    <comment_count>9</comment_count>
    <who name="">me</who>
    <bug_when>2025-12-13 03:28:24 -0800</bug_when>
    <thetext>I think i&apos;m hitting this issue.

Two issues:


1. Basically my dialog slides out and the backdrop fades out perfectly in Chrome etc, but in Safari, as soon as the close event is triggered, the dialog loses it&apos;s top-layer and the header bar of my site jumps above it on the Z axis.

2. The backdrop fades in nicely but it snaps closed instantly rather than fading out like it should.

Navigate to rctneil.co.uk.  Narrow the browser until the menu button is visible at the top right.  Click it to invoke the dialog that slides in and out from the right.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>