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

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