WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
320744
font-* properties should use the metrics of the parent element's font for font-relative unit resolution
https://bugs.webkit.org/show_bug.cgi?id=320744
Summary
font-* properties should use the metrics of the parent element's font for fon...
Sam Weinig
Reported
2026-07-31 08:42:21 PDT
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't really come up, since no other font-* property allows lengths, but through the use of calc() it can still be observed. For example, ``` <style> #container { font-size: 10px; } #element { font-size: 100px; font-size-adjust: calc(1em / 1px); } </style> <div id=container> <div id=element> </div> </div> ``` The computed style for element'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.
Attachments
Test case
(563 bytes, text/html)
2026-07-31 08:45 PDT
,
Sam Weinig
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2026-07-31 08:45:46 PDT
Created
attachment 480895
[details]
Test case
Radar WebKit Bug Importer
Comment 2
2026-08-07 08:43:12 PDT
<
rdar://problem/184336424
>
Sam Weinig
Comment 3
2026-08-12 08:24:23 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/71441
EWS
Comment 4
2026-08-12 12:55:13 PDT
Committed
319052@main
(c64b47e33694): <
https://commits.webkit.org/319052@main
> Reviewed commits have been landed. Closing PR #71441 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug