W3C home > Mailing lists > Public > public-css-testsuite@w3.org > November 2018

Re: [css-values] possible circular dependency of lh unit

From: Gérard Talbot <www-style@gtalbot.org>
Date: Wed, 31 Oct 2018 20:10:15 -0400
To: Florian Rivoal <florian@rivoal.net>
Cc: fantasai <fantasai@inkedblade.net>, Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>, public-css-testsuite@w3.org
Message-ID: <2f3fc6e8134435916682578aae98d88e@gtalbot.org>
Le 2018-10-31 17:23, Florian Rivoal a écrit :
>> On Oct 25, 2018, at 22:16, Gérard Talbot <www-style@gtalbot.org> 
>> wrote:
>> Le 2018-10-24 20:12, Amelia Bellamy-Royds a écrit :
>>> Hi Gérard,
>>> There's a paragraph at the end of the section on font-relative units 
>>> that
>>> explains how circular references are avoided.
>>> https://drafts.csswg.org/css-values-4/#font-relative-lengths

[I initially wanted to reply in the www-style mailing list but I hit the 
wrong email address when sending email.]

>> Hello Amelia,
>> Thank you for your response. I missed that.
>> [snipped]
>>>> When used in the value of the font-size
>>>> <https://drafts.csswg.org/css-fonts-3/#propdef-font-size> property 
>>>> on the
>>>> element they refer to, they resolve against the computed metrics of 
>>>> the
>>>> parent element—or against the computed metrics corresponding to the
>>>> initial values of the font and line-height properties, if the 
>>>> element has
>>>> no parent.
>> [snipped]
>> I am also confused about the meaning of that parg with regards to one 
>> particular code scenario.
>> Let's postulate that the computed metrics corresponding to the initial 
>> value of the line-height is 19.2px and that the initial font size 
>> value for the root element is 16px (these values are usually in effect 
>> in the CSS tests). Then what is the used font size for the root 
>> element in this rule:
>> html {font-size: 2lh;} /* I think it should be 38.4px */
> With the above assumptions, yes.
>> Why that particular parg says "initial values of the font" and not 
>> "initial values of the font size"? And why not initial value of font 
>> size *or* line-height?
> I am unsure about the difference you make between "and" and "or" in
> this sentence.


You figured this "and" versus "or" out in another email. If initial 
'line-height' value is 'normal', then you need to know the font-family 
and font-size in order to convert into a computed value.


> As for "font" vs "font-size", I think I agree with you, but I am no
> longer sure why the text is this way. However, fantasai made large
> editorial fixes to that text a while back[1], but did not change that,
> so I am wondering if this was justified after all. Fantasai?
> —Florian
> [1]
> https://github.com/w3c/csswg-drafts/commit/b3b3292e413958ad81e3567059247e5ea87d76a0
Received on Thursday, 1 November 2018 00:10:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:23 UTC