W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

Re: [csswg-drafts] [css-inline] A question for the procedure to compute the resolved value of "line-height" (#3749)

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Mon, 25 Mar 2019 03:47:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-476045477-1553485644-sysbot+gh@w3.org>
Thanks @emilio. Unless I misunderstand something, it seems that getComputedStyle on `line-height: normal` does not, unlike what @MatsPalmgren suggested it might do, return the height of the first fragment (regardless of how you define fragment).

So I still think that returning `normal` as a keyword, rather than some artificial measurement of what the line-height might end up being, is preferable. getComputedStyle is generally attempting to return the computed value, and mostly only returns post layout used values when compatibility requires. In this case, compat doesn't seem to require it (since chrome can without issue do something else), and what webkit and gecko are returning aren't actually post-layout used values.

If we're actually trying to expose font-derived metrics so that people can do useful things with them, I think we should rather look into that on the houdini side, rather than try and shoehorn them through an API that doesn't have sufficient granularity anyway.

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3749#issuecomment-476045477 using your GitHub account
Received on Monday, 25 March 2019 03:47:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:45 UTC