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: Mats Palmgren via GitHub <sysbot+gh@w3.org>
Date: Sat, 30 Mar 2019 00:29:29 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-478187692-1553905768-sysbot+gh@w3.org>
@emilio wrote:
> I disagree, what we return is the value for line-height that is used during layout.

Indeed, me too.  There seems to be some confusion in this issue about what the used value of the `line-height` property is.  That's odd, because [the spec](https://www.w3.org/TR/CSS22/visudet.html#propdef-line-height) is utterly clear on this:

> **`normal`**
>     Tells user agents to set the used value to a "reasonable" value based on the font of the element. The value has the same meaning as `<number>`. We recommend a used value for 'normal' between 1.0 to 1.2. 
> **`<number>`**
>     The used value of the property is this number multiplied by the element's font size.

Given those definitions and the fact that Blink returns a pixel-value for `<number>`, it seems it could trivially implement what the spec says.

To highlight exactly how Gecko does it, here's the [key lines](https://searchfox.org/mozilla-central/rev/7c20ad925005fbad7b8e08813115f1ec7fa1c248/layout/generic/ReflowInput.cpp#2810,2824-2826,2832-2835).

-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3749#issuecomment-478187692 using your GitHub account
Received on Saturday, 30 March 2019 00:29:30 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:06 UTC