[Webkit-unassigned] [Bug 259551] New: The `from-font` value for CSS `font-size-adjust` is not computed correctly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 27 05:15:25 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=259551
Bug ID: 259551
Summary: The `from-font` value for CSS `font-size-adjust` is
not computed correctly
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jfkthame at gmail.com
Support for the `from-font` value was implemented in https://bugs.webkit.org/show_bug.cgi?id=254790, but does not behave according to the spec.
The current spec[1] says that the computed value of `font-size-adjust` is
the keyword none, or a pair of a metric keyword and a <number>
and for the `from-font` keyword[2] it confirms that this
Computes to the <number> corresponding to the specified metric of the first available font.
However, in Safari Tech Preview[3] I'm seeing `from-font` retained as the computed value. This results in incorrect behavior, because when inherited by a child element, it may then resolve to different numbers depending on the font of the child (instead of inheriting the number computed from the metrics of the font on the element where it was specified).
In addition, it appears that the value is not being resolved using the metrics of the first available font *of the element where `font-size-adjust` was specified*, but rather using metrics from the parent element. This can be seen in the demo at https://codepen.io/jfkthame/pen/NWEMaaG, where the use of `from-font` gives different results depending on the font family of the containing block, instead of being computed from the paragraph's own first available font.
See also https://github.com/w3c/csswg-drafts/issues/9050.
[1] https://drafts.csswg.org/css-fonts-5/#font-size-adjust-prop
[2] https://drafts.csswg.org/css-fonts-5/#valdef-font-size-adjust-from-font
[3] Release 171 (Safari 16.4, WebKit 18616.1.15)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230727/20b3b648/attachment-0001.htm>
More information about the webkit-unassigned
mailing list