<?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>240653</bug_id>
          
          <creation_ts>2022-05-19 08:10:42 -0700</creation_ts>
          <short_desc>[iOS] opacity animation changes computed font-size</short_desc>
          <delta_ts>2026-01-12 09:05:11 -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 15</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 15</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HTML5, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mauricio">mauricio</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1870378</commentid>
    <comment_count>0</comment_count>
    <who name="Mauricio">mauricio</who>
    <bug_when>2022-05-19 08:10:42 -0700</bug_when>
    <thetext>Safari iOS has a bug that will make a `font-size` property scale up consistently in the presence of an opacity animation. The computed value diverges from the set CSS value. But even without a set CSS value, you can see how the text jumps, speak the `font-size` grows at the end of the animation.

To reproduce the bug, you need a parent DOM element containing a unit width or height + `overflow: hidden. At the same time, you require at least two `&lt;p&gt;`. And last a DOM element with `opacity: 0` will be set to 1 through JavaScript (See the HTML example below).

You can see a live demo in this CodeSandbox. https://8d838r.csb.app/

This is a minimal representation of the bug.

&lt;!DOCTYPE html&gt;
&lt;head&gt;
  &lt;style&gt;
    .container {
      overflow: hidden;
      width: 100%;
      height: 2000px;
      background: yellow;
    }

    .transition {
      opacity: 0;
      background: red;
      width: 9px;
      height: 9px;
      will-change: transform;
      z-index: 2;
    }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div class=&quot;container&quot;&gt;
    &lt;p&gt;XXX&lt;/p&gt;
    &lt;p&gt;XXX&lt;/p&gt;
    &lt;p&gt;XXX&lt;/p&gt;
    &lt;p&gt;XXX&lt;/p&gt;
    &lt;div id=&quot;ani&quot; class=&quot;transition&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;

  &lt;script&gt;
    setTimeout(() =&gt; {
      document.getElementById(&quot;ani&quot;).style.opacity = 1;
    }, 2000);
  &lt;/script&gt;
&lt;/body&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870394</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-05-19 08:45:30 -0700</bug_when>
    <thetext>I feel like I&apos;ve seen this bug recently, but I can&apos;t find any duplicate, Antoine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870396</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-05-19 08:47:34 -0700</bug_when>
    <thetext>Does not ring a bell!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872014</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-26 08:11:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/93970773&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>