<?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>232280</bug_id>
          
          <creation_ts>2021-10-25 15:40:44 -0700</creation_ts>
          <short_desc>Missing &apos;from&apos; selector on @keyframes works erratically</short_desc>
          <delta_ts>2022-02-01 07:01:07 -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>Safari Technology Preview</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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>jzabinski</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>graouts</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1808634</commentid>
    <comment_count>0</comment_count>
    <who name="">jzabinski</who>
    <bug_when>2021-10-25 15:40:44 -0700</bug_when>
    <thetext>When @keyframes rules are used to animate elements and the &apos;from&apos; selector is missing, the animation behaves erratically.
See this example:

https://stackblitz.com/edit/web-platform-vmalvc?file=styles.css

styles.css contains this @keyframes rule:

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

Running the project in Safari Technology Preview, I find that the line is animated erratically: anywhere from 20-60% of the time. If I add the &apos;from&apos; keyword:

@keyframes dash {
  from {
    stroke-dashoffset: 14.7;
  }
  to {
    stroke-dashoffset: 0;
  }
}

The animation seems to happen consistently.

W3C says that &apos;If a 0% or from keyframe is not specified, then the user agent constructs a 0% keyframe using the computed values of the properties being animated.&apos; That computation does not seem to be happening consistently. (Other browsers like Chrome work fine.)

(Reference: https://www.w3.org/TR/css-animations-1/)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1810931</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-01 15:41:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/84903751&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835876</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-02-01 02:41:36 -0800</bug_when>
    <thetext>Can you still reproduce the issue with Safari Technology Preview 139? I&apos;m not able to reproduce it myself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835906</commentid>
    <comment_count>3</comment_count>
    <who name="">jzabinski</who>
    <bug_when>2022-02-01 04:18:03 -0800</bug_when>
    <thetext>Verified: no longer reproduces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835946</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-02-01 07:01:07 -0800</bug_when>
    <thetext>Great! Thanks for checking.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>