<?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>46041</bug_id>
          
          <creation_ts>2010-09-18 14:10:24 -0700</creation_ts>
          <short_desc>CSS inheritance delayed when transition duration on parent and child elements</short_desc>
          <delta_ts>2026-01-12 09:02:22 -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>Animations</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sidney San Martín">s+webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>Alexandre.bonneau</cc>
    
    <cc>cmarrin</cc>
    
    <cc>corsar89</cc>
    
    <cc>dino</cc>
    
    <cc>emilio</cc>
    
    <cc>graouts</cc>
    
    <cc>iRoyPeleg</cc>
    
    <cc>kizmarh</cc>
    
    <cc>koivisto</cc>
    
    <cc>maggotfish</cc>
    
    <cc>marie.hanotte</cc>
    
    <cc>pikachu17997</cc>
    
    <cc>scott</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>281178</commentid>
    <comment_count>0</comment_count>
      <attachid>68015</attachid>
    <who name="Sidney San Martín">s+webkit</who>
    <bug_when>2010-09-18 14:10:24 -0700</bug_when>
    <thetext>Created attachment 68015
Demo of font-size not being inherited until the transition is complete

When both a parent and a child element have -webkit-transition-durations for an inherited style property, and the property changes on the parent element, the property does not begin to change on the child element until the transition is complete on the parent. This only appears to happen in some cases

Try clicking the outer element in the demo a few times. When it adds and removes a class from the outer element that increases its font-size. When the class is added, the font-size of the inner element does not change until the transition is complete, but when it is removed, the transitions happen simultaneously. If you remove the -webkit-transition-duration from the inner element, the font-size transitions happen simultaneously in both directions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>586852</commentid>
    <comment_count>1</comment_count>
      <attachid>133584</attachid>
    <who name="Rob Arnold">robarnold</who>
    <bug_when>2012-03-23 16:26:29 -0700</bug_when>
    <thetext>Created attachment 133584
Test case

I also ran across this playing around with background-color</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1109078</commentid>
    <comment_count>2</comment_count>
    <who name="Scott">scott</who>
    <bug_when>2015-07-13 03:14:54 -0700</bug_when>
    <thetext>This is still an issue almost 5 years later. My main concern with this reported issue is that it is still not seen as a priority and yet there is no CSS workaround for many use cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1109111</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-07-13 09:04:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/21793947&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264992</commentid>
    <comment_count>4</comment_count>
    <who name="shrpne">corsar89</who>
    <bug_when>2017-01-09 08:28:25 -0800</bug_when>
    <thetext>Here is another showcase http://codepen.io/schonert/details/ovjhd/
And it is still not fixed for 6 years</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342109</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandre Bonneau">Alexandre.bonneau</who>
    <bug_when>2017-08-24 11:57:25 -0700</bug_when>
    <thetext>Perhaps this is related ; you can clearly see the faulty behavior on this live  example : https://codepen.io/AnotherLinuxUser/pen/ZJRNWP?editors=1100

Is there any way this gets more traction after 7 years?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342119</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandre Bonneau">Alexandre.bonneau</who>
    <bug_when>2017-08-24 12:09:09 -0700</bug_when>
    <thetext>This is the workaround for the problem I posted earlier ; at comment #1 mentioned, you have to just through hoops in order to avoid having a transition on the parent and child at the same time.

The workaround : https://codepen.io/AnotherLinuxUser/pen/MvBEzN?editors=1100

The bug still needs fixing though ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971669</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-08-16 15:53:40 -0700</bug_when>
    <thetext>I am able to reproduce this bug using WebKit ToT (266957@main) using following test case (from Comment 05): https://codepen.io/AnotherLinuxUser/pen/ZJRNWP?editors=1100

^ If you hover on &apos;XXX&apos;, it will take some time to reflect background update on &apos;There is a delay here&apos;.

WebKit &amp; Chrome Canary 118 both have this issue while Firefox Nightly 118 does not have this issue and reflect update immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971676</commentid>
    <comment_count>9</comment_count>
    <who name="Scott">scott</who>
    <bug_when>2023-08-16 16:00:51 -0700</bug_when>
    <thetext>13 years. Think they going for some sort of bug existence record with this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007527</commentid>
    <comment_count>10</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-01-25 04:12:45 -0800</bug_when>
    <thetext>The issue here is that WebKit and Chrome both trigger a _new_ transition for font-size on #inner on each animation frame as the #outer value changes. I will have to check the correct behavior here per spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007528</commentid>
    <comment_count>11</comment_count>
      <attachid>469546</attachid>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-01-25 04:16:18 -0800</bug_when>
    <thetext>Created attachment 469546
Testcase with logging

Attaching a new testcase which logs how transitions are started. It shows three different behaviors:

Firefox: single transitionstart event for both #outer and #inner going from 16px to 32px

Safari: single transitionstart event for #outer going from 16px to 32px and one transitionstart event for #inner per frame showing how we try to interpolate from the last interpolated value from the parent to the newly interpolated value until the parent&apos;s transition completes.

Chrome: single transitionstart event for #outer going from 0px to 0px and several, but fewer, transitionstart event for #inner from 0px to 0px. There&apos;s clearly a bug in Chrome with getKeyframes() in this instance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007555</commentid>
    <comment_count>12</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-01-25 07:23:33 -0800</bug_when>
    <thetext>I think the Firefox behavior is correct (on top of being rather clearly what the author would expect). Here&apos;s the relevant spec text, from https://drafts.csswg.org/css-transitions-1/#starting:

&quot;Likewise, define the after-change style as the computed values of all properties on the element based on the information known at the start of that style change event, but using the computed values of the animation-* properties from the before-change style, excluding any styles from CSS Transitions in the computation, and inheriting from the after-change style of the parent.&quot;

When the &quot;triggered&quot; CSS class is applied and font-size changes to 2em on the #outer element, I interpret this spec text as having these effects:

1. for #outer this would mean the after-change style is 2em, which computes to 32px
2. for #inner, the after-change style will inherit from the #outer after-change style, and thus be 32px

As such both elements should transition together from 16px to 32px.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2093277</commentid>
    <comment_count>13</comment_count>
    <who name="">iRoyPeleg</who>
    <bug_when>2025-02-09 02:57:26 -0800</bug_when>
    <thetext>Chrome has recently resolved this issue, chromium bug: https://issues.chromium.org/issues/40337057

As of Today&apos;s Chrome Canary, I&apos;ve verified this issue is indeed resolved.

There&apos;s a good chance that the chrome fixes could be directly imported, or at least have great inspiration on how to resolve it here as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100998</commentid>
    <comment_count>14</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-03-06 08:39:17 -0800</bug_when>
    <thetext>We&apos;re now the last browser engine having this issue :( Cc&apos;ing antti who might have ideas here.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>68015</attachid>
            <date>2010-09-18 14:10:24 -0700</date>
            <delta_ts>2010-09-18 14:10:24 -0700</delta_ts>
            <desc>Demo of font-size not being inherited until the transition is complete</desc>
            <filename>webkit_transition_cascade_lag.html</filename>
            <type>text/html</type>
            <size>1037</size>
            <attacher name="Sidney San Martín">s+webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cgo8aHRtbD4KPGhlYWQ+Cgk8dGl0bGU+SW5oZXJpdGFuY2UgbGFnPC90
aXRsZT4KCTxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyIgbWVkaWE9InNjcmVlbiI+CgkJZGl2ewoJCQli
b3JkZXI6IDJweCBzb2xpZCBibGFjazsKCQkJcGFkZGluZzogMWVtOwoJCQltYXJnaW46IDFlbTsK
CQkJdGV4dC1hbGlnbjogY2VudGVyOwoJCQktd2Via2l0LXRyYW5zaXRpb24tZHVyYXRpb246IDJz
OwoJCX0KCQkjb3V0ZXJ7CgkJCXBvc2l0aW9uOiBhYnNvbHV0ZTsKCQkJcGFkZGluZzogMjBweDsK
CQl9CgkJI291dGVyLnRyaWdnZXJlZHsKCQkJZm9udC1zaXplOiAyZW07CgkJfQoJPC9zdHlsZT4K
PC9oZWFkPgoKPGJvZHk+CjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9Im91dGVyX3RvZ2dsZSIg
Y2hlY2tlZCBvbmNoYW5nZT0iZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ291dGVyJykuc3R5bGUu
d2Via2l0VHJhbnNpdGlvbkR1cmF0aW9uID0gdGhpcy5jaGVja2VkID8gJzJzJyA6ICcwJyI+PGxh
YmVsIGZvcj0ib3V0ZXJfdG9nZ2xlIj5vdXRlciA8Y29kZT4td2Via2l0LXRyYW5zaXRpb24tZHVy
YXRpb248L2NvZGU+PC9sYWJlbD48YnI+CjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9ImlubmVy
X3RvZ2dsZSIgY2hlY2tlZCBvbmNoYW5nZT0iZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2lubmVy
Jykuc3R5bGUud2Via2l0VHJhbnNpdGlvbkR1cmF0aW9uID0gdGhpcy5jaGVja2VkID8gJzJzJyA6
ICcwJyI+PGxhYmVsIGZvcj0iaW5uZXJfdG9nZ2xlIj5pbm5lciA8Y29kZT4td2Via2l0LXRyYW5z
aXRpb24tZHVyYXRpb248L2NvZGU+PC9sYWJlbD4KCjxwPgoJQ2xpY2sgdG8gdG9nZ2xlIHRoZSBv
dXRlciA8Y29kZT4mbHQ7ZGl2Jmd0OzwvY29kZT4ncyA8Y29kZT5mb250LXNpemU8L2NvZGU+Lgo8
L3A+Cgo8ZGl2IGlkPSJvdXRlciIgb25jbGljaz0idGhpcy5jbGFzc05hbWUgPSB0aGlzLmNsYXNz
TmFtZSA/ICcnIDogJ3RyaWdnZXJlZCciPgoJT3V0ZXIKCTxkaXYgaWQ9ImlubmVyIj5Jbm5lcjwv
ZGl2Pgo8L2Rpdj4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>133584</attachid>
            <date>2012-03-23 16:26:29 -0700</date>
            <delta_ts>2012-03-23 16:26:29 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>animation.html</filename>
            <type>text/html</type>
            <size>676</size>
            <attacher name="Rob Arnold">robarnold</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxzdHlsZT4KKiB7CiAgLXdlYmtpdC10cmFuc2l0aW9uLWR1cmF0aW9u
OiAxMDAwbXM7CiAgLW1vei10cmFuc2l0aW9uLWR1cmF0aW9uOiAxMDAwbXM7Cn0KI2NvbnRhaW5l
ciB7CiAgd2lkdGg6IDUwcHg7CiAgaGVpZ2h0OiA1MHB4OwogIGJhY2tncm91bmQtY29sb3I6IHJl
ZDsKfQoKaW5wdXQgewogIHdpZHRoOiAxMDAlOwp9CgojY29udGFpbmVyLndoZWUgewogIC13ZWJr
aXQtdHJhbnNmb3JtOiB0cmFuc2xhdGVYKDQwMHB4KTsKICAtbW96LXRyYW5zZm9ybTogdHJhbnNs
YXRlWCg0MDBweCk7CiAgYmFja2dyb3VuZC1jb2xvcjogZ3JlZW47Cn0KCiNoYXRlciB7CiAgcG9z
aXRpb246IGFic29sdXRlOwogIHRvcDogNTBweDsKICBsZWZ0OiA1MHB4OwogIHdpZHRoOiA0MDBw
eDsKICBoZWlnaHQ6IDIwMHB4OwogIGJhY2tncm91bmQtY29sb3I6IGluaGVyaXQ7Cn0KCjwvc3R5
bGU+CjxzY3JpcHQ+CmZ1bmN0aW9uIG9oYWkoZWxlbSkgewogIGVsZW0ucGFyZW50RWxlbWVudC5w
YXJlbnRFbGVtZW50LmNsYXNzTGlzdC50b2dnbGUoJ3doZWUnKTsKfQoKPC9zY3JpcHQ+CjxkaXYg
aWQ9ImNvbnRhaW5lciI+CjxkaXYgaWQ9ImhhdGVyIj4KPGlucHV0IHR5cGU9ImJ1dHRvbiIgdmFs
dWU9IkhlbGxvIiBvbmNsaWNrPSJvaGFpKHRoaXMpOyIvPgo8L2Rpdj4KPC9kaXY+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>469546</attachid>
            <date>2024-01-25 04:16:18 -0800</date>
            <delta_ts>2024-01-25 04:16:18 -0800</delta_ts>
            <desc>Testcase with logging</desc>
            <filename>bug-46041.html</filename>
            <type>text/html</type>
            <size>899</size>
            <attacher name="Antoine Quint">graouts</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cgo8aHRtbD4KPGhlYWQ+Cgk8dGl0bGU+SW5oZXJpdGFuY2UgbGFnPC90
aXRsZT4KCTxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyIgbWVkaWE9InNjcmVlbiI+CgkJZGl2ewoJCQli
b3JkZXI6IDJweCBzb2xpZC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