W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-values-4] Bugs in definition of exceptions for font-relative length units (#5228)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 18 Jun 2020 13:05:36 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-646004072-1592485535-sysbot+gh@w3.org>
Yes, `font-size: 1lh` resolves to the computed `line-height` of the parent, even if there is no cycle.

But `line-height: 1em` resolves the the computed `font-size` of that element, not the parent. The above ensures that this won't be cyclic.

So basically, for a non-root element, you first compute `font-size`, resolving font-relative units with the parent. This sets the all non-root units except `lh`. Then you compute `line-height`, using the previously calculated units, but resolving `lh` with the parent. This sets the `lh` unit.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5228#issuecomment-646004072 using your GitHub account
Received on Thursday, 18 June 2020 13:05:38 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:12 UTC