<?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>284527</bug_id>
          
          <creation_ts>2024-12-12 06:22:07 -0800</creation_ts>
          <short_desc>[scroll-animations] https://scroll-driven-animations.style/demos/shrinking-header-shadow/css/ does not work</short_desc>
          <delta_ts>2025-06-24 07:51:07 -0700</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/53207</see_also>
          <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>
          
          <blocked>284525</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Antti Koivisto">koivisto</assigned_to>
          <cc>graouts</cc>
    
    <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2081124</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-12-12 06:22:07 -0800</bug_when>
    <thetext>The demo https://scroll-driven-animations.style/demos/shrinking-header-shadow/css/ does not work perfectly: there&apos;s an issue with text layout in the shrinking header.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2081125</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-12-12 06:22:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/141356000&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113935</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 09:15:15 -0700</bug_when>
    <thetext>I think this might simply be a CSS Grid layout issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113936</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 09:18:47 -0700</bug_when>
    <thetext>Not sure what is causing the bug but it&apos;s definitely a CSS issue unrelated to scroll-driven animations. Going to reduce this. The application of margin in this rule differs in Chrome and STP:

@layer demo
@layer reset
:is(header, main, footer) *, body {
    margin: 0;
    padding: 0;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113944</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 09:31:17 -0700</bug_when>
    <thetext>Actually, it does seem to be animation-related, the `font-size` applied to `.info h2` resolves to `24px` in both Chrome and STP as a result of an animation, but renders differently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113946</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 09:34:44 -0700</bug_when>
    <thetext>The computed margin on `.info h2` differs in Chrome and STP. It is set to 0 through CSS, but somehow we resolve it to ~20px in the y axis.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113959</commentid>
    <comment_count>6</comment_count>
      <attachid>475081</attachid>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 10:05:14 -0700</bug_when>
    <thetext>Created attachment 475081
Reduction

I have a simple reduction, attached and reproduced below:

```
&lt;style&gt;

@keyframes anim {
    from, to { font-size: 100px; }
}

h2 {
    margin: 0;
    background-color: lightblue;
    animation: anim both;
}

&lt;/style&gt;

&lt;h2&gt;Test&lt;/h2&gt;
```

The margin should be computed to 0 but isn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113960</commentid>
    <comment_count>7</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-04-29 10:09:53 -0700</bug_when>
    <thetext>Over to CSS, probably good for Antti to take a look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2123932</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2025-06-16 05:57:06 -0700</bug_when>
    <thetext>adding some borders make the issue more visual

&lt;style&gt;
@keyframes anim {
    from, to { font-size: 100px; }
}
h2 {
    margin: 0;
    background-color: lightblue;
    animation: anim both;
}
div { border: 2px solid green; }
&lt;/style&gt;
&lt;div&gt;
&lt;h2&gt;Test&lt;/h2&gt;
&lt;/div&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2123963</commentid>
    <comment_count>9</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2025-06-16 08:53:30 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/46808</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2124146</commentid>
    <comment_count>10</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-06-17 01:23:45 -0700</bug_when>
    <thetext>Committed 296304@main (3b8072782a83): &lt;https://commits.webkit.org/296304@main&gt;

Reviewed commits have been landed. Closing PR #46808 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2124154</commentid>
    <comment_count>11</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2025-06-17 01:42:39 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/53207</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125488</commentid>
    <comment_count>12</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-06-24 07:51:07 -0700</bug_when>
    <thetext>*** Bug 294902 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>475081</attachid>
            <date>2025-04-29 10:05:14 -0700</date>
            <delta_ts>2025-04-29 10:05:14 -0700</delta_ts>
            <desc>Reduction</desc>
            <filename>bug-284527.html</filename>
            <type>text/html</type>
            <size>230</size>
            <attacher name="Antoine Quint">graouts</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPHN0eWxlPgoKQGtleWZyYW1lcyBhbmltIHsK
ICAgIGZyb20sIHRvIHsgZm9udC1zaXplOiAxMDBweDsgfQp9CgpoMiB7CiAgICBtYXJnaW46IDA7
CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaWdodGJsdWU7CglhbmltYXRpb246IGFuaW0gYm90aDsK
fQoKPC9zdHlsZT4KPC9oZWFkPgoKPGJvZHk+Cgk8aDI+VGVzdDwvaDI+CjwvYm9keT4KPC9odG1s
Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>