<?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>320744</bug_id>
          
          <creation_ts>2026-07-31 08:42:21 -0700</creation_ts>
          <short_desc>font-* properties should use the metrics of the parent element&apos;s font for font-relative unit resolution</short_desc>
          <delta_ts>2026-08-12 12:55:16 -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>Safari 18</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Sam Weinig">sam</reporter>
          <assigned_to name="Sam Weinig">sam</assigned_to>
          <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2236027</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-07-31 08:42:21 -0700</bug_when>
    <thetext>Currently, we only special case font-size to use the parent elements font metrics for font-relative units, but the CSS Values spec says all properties of the form font-* should use the parent element. In practice, this doesn&apos;t really come up, since no other font-* property allows lengths, but through the use of calc() it can still be observed. For example,

```
&lt;style&gt;
#container { font-size: 10px; }
#element { font-size: 100px; font-size-adjust: calc(1em / 1px); }
&lt;/style&gt;
&lt;div id=container&gt;
   &lt;div id=element&gt;
   &lt;/div&gt;
&lt;/div&gt;
```

The computed style for element&apos;s font-size-adjust property should be `10` (because it should use the parent font-size where 1em == 10px, and therefore 10px / 1px == 1), and not `100` as it is today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2236029</commentid>
    <comment_count>1</comment_count>
      <attachid>480895</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-07-31 08:45:46 -0700</bug_when>
    <thetext>Created attachment 480895
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2238315</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-08-07 08:43:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/184336424&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2239627</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-08-12 08:24:23 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/71441</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2239704</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-08-12 12:55:13 -0700</bug_when>
    <thetext>Committed 319052@main (c64b47e33694): &lt;https://commits.webkit.org/319052@main&gt;

Reviewed commits have been landed. Closing PR #71441 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>480895</attachid>
            <date>2026-07-31 08:45:46 -0700</date>
            <delta_ts>2026-07-31 08:45:46 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>test-font-relative-in-font-star.html</filename>
            <type>text/html</type>
            <size>563</size>
            <attacher name="Sam Weinig">sam</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8c3R5bGU+CgogICAgI2NvbnRhaW5lciB7
CiAgICAgIGZvbnQtc2l6ZTogMTBweDsKICAgIH0KICAgICNlbGVtZW50IHsKICAgICAgZm9udC1z
aXplOiAxMDBweDsKICAgICAgZm9udC1zaXplLWFkanVzdDogY2FsYygxZW0gLyAxcHgpOwogICAg
fQogIDwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+CjxwcmUgaWQ9Y29uc29sZT48L3ByZT4KCjxkaXYg
aWQ9ImNvbnRhaW5lciI+CiAgPGRpdiBpZD0iZWxlbWVudCI+PC9kaXY+CjwvZGl2PgoKPHNjcmlw
dD4KICBjb25zdCBjb25zb2xlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImNvbnNvbGUiKTsK
CiAgZnVuY3Rpb24gbG9nKG1zZykKICB7CiAgICBjb25zb2xlLnRleHRDb250ZW50ICs9IG1zZyAr
ICJcbiI7CiAgfQogIAogIGxvZygiZm9udC1zaXplLWFkanVzdCIpCiAgbG9nKCJjb21wdXRlZDog
IiArIHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJlbGVt
ZW50IikpLmZvbnRTaXplQWRqdXN0KTsKPC9zY3JpcHQ+CjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>