W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [css-values] Cyclic definitions with relative units

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Dec 2017 07:02:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-352342052-1513580554-sysbot+gh@w3.org>
I think there's a simpler solution, and it is the one I intended when I proposed the text, but it looks like that got lost along the way, or the the initial wording may have been ambiguous as well (this commit seems to be the culprit to me: https://github.com/w3c/csswg-drafts/commit/95f91ae611e52c1d6b71251f61dcb833d57ede79).

I think `lh` should always resolve to the metrics of the parent when used in either `font-size` and in `line-height`, not just when used in `line-height`.

This rules out setting the line-height to something manually to some absolute value, and then setting the font-size on the same element to a function of that, which your approach would enable, but I don't think there's a use case for that, and always going for the parent is much simpler.

So, it seems that a sufficient fix would be to change/clarify:
>When used in the value of the `font-size` property (or the `line-height property`, for the lh and rlh units) 	on the element they refer to, these units [...]

>When used in the value of the `font-size property` (and additionally for the `lh` and `rlh` units, in the the `line-height` property) on the element they refer to, these units [...]

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2115#issuecomment-352342052 using your GitHub account
Received on Monday, 18 December 2017 07:02:38 UTC

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