W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

Re: [csswg-drafts] [css2][css-inline] Definition of line-height calculations contradicts itself

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Fri, 12 Aug 2016 21:42:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-239566878-1471038143-sysbot+gh@w3.org>
According to the following test:

<!DOCTYPE html>
<meta charset=utf-8>
p { border: solid 1px black; color: silver; font-size: 100px; 
line-height: 1; margin: 0.1em;}
p > * { border: 1px dotted red; }

<p style="font-family: Ahem, SimSun"><span>Ép不</span>
<p style="font-family: SimSun, Ahem"><span>Ép不</span>
<p style="font-family: Ahem, SimSun"><span>不</span>

Blink and Gecko use the metrics of the first available font to 
determine the bounding box of any given inline.

Related test with multiple inlines (gives different results than font 
<p style="font-family: SimSun"><span>不A</span><span 
style="font-family: Ahem">Ép</span>

I think this behavior makes sense and we should update the spec 
accordingly. It has the benefit of minimizing any line-height 

“The height of the inline box encloses all glyphs and their 
half-leading on each side and is thus exactly 'line-height'.”

Afaict this would mean fixing the contradiction in favor of the second
 clause in this sentence, not the first.

GitHub Notification of comment by fantasai
Please view or discuss this issue at 
using your GitHub account
Received on Friday, 12 August 2016 21:42:32 UTC

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