Re: [csswg-drafts] [css-values] Consider requiring same relative <length> units in atan2() (#8169)

We can't change the behavior of `line-height: 1em;` in general (it uses current-element ems), and special-casing it to change behavior if and only if `font-size` was in `lh` is a difficult-to-predict, action-at-a-distance sort of thing that we generally want to avoid. But we have to break the cycle *somehow*, so having `font-size: 1lh;` always resolve against the parent was the most reasonable thing to do.

Digging in a little deeper, tho, while line-height and font-size usually establish a dependency, they're not *semantically connected* - the font size and the height of a line don't readily appear to be different aspect of the same concept, at least imo. It's thus more acceptable to have them differ on which element they refer to, in these cases.

On the other hand, `em` and `ex` (and all the other explicitly font-based units) *are* conceptually related; they're all sizing according to some text, and it's not uncommon for them to be used in parallel fashions. Having them differ on what element they refer to would make the grouping conceptually incoherent.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8169#issuecomment-1777965153 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 24 October 2023 20:12:49 UTC