[Webkit-unassigned] [Bug 250012] baseline-shift property does not allow inheritance of numerical values

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 20 01:31:48 PDT 2023


--- Comment #6 from Karl Dubost <karlcow at apple.com> ---
The spec says

> Percentages: 	refer to the used value of line-height
> Computed value: the specified keyword or a computed <length-percentage> value 

The test case in the JS fiddle is 

data:text/html,<svg height="0" style="baseline-shift: 100%;"><text></text></svg>

and window.getComputedStyle(document.getElementsByTagName('svg')[0]).baselineShift


0px       in Safari 
undefined in Firefox
100%      in Chrome

line-height value in that test case is: `normal`

If I set the height to something different than 0.
data:text/html,<svg height="10" style="baseline-shift: 100%;"><text></text></svg>

212.249863px in Safari 
undefined    in Firefox
100%         in Chrome

To me, WebKit does the right thing as it returns the computed <length-percentage> value, defined in

> <length-percentage>
>     Equivalent to [ <length> | <percentage> ], where the <percentage> will resolve to a <length>.

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/20230920/7a61f902/attachment.htm>

More information about the webkit-unassigned mailing list