- From: joonghunpark via GitHub <sysbot+gh@w3.org>
- Date: Wed, 20 Mar 2019 00:23:35 +0000
- To: public-css-archive@w3.org
joonghunpark has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-inline] A question for the procedure to compute the used value of "line-height" == I have a question about the procedure to compute the used value of "line-height". I'm currently making a change on blink in https://chromium-review.googlesource.com/c/chromium/src/+/1522053/3. This change is for "line-height" to return used value instead of "normal keyword" as resolved value. In case of WebKit, fontMetrics().lineSpacing() value is used instead of 'normal' as below. int RenderStyle::computedLineHeight() const { const Length& lh = lineHeight(); // Negative value means the line height is not set. Use the font's built-in spacing. if (lh.isNegative()) return fontMetrics().lineSpacing(); if (lh.isPercentOrCalculated()) return minimumValueForLength(lh, computedFontPixelSize()); return clampTo<int>(lh.value()); } And Firefox returns used value "px" instead of "normal" also. But I'm not sure what is the exact procedure to compute the used value for "line-height", because I coundn't find that in spec. Is it ok to use font metircs linespacing value like WebKit, or is there a exact procedure to compute the used value? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3749 using your GitHub account
Received on Wednesday, 20 March 2019 00:23:36 UTC