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

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