Re: [csswg-drafts] [css-inline] Can't specify line gaps (#5152)

I support doing something along these lines. One combination that I think is particularly important is `normal + <length>`. Currently, authors can either:
- use `line-height: normal`, and benefit from the built-in robustness that this value offers by taking font metrics into account, and avoid overlap even in unexpected situations (which can easily arise due to font fallback and in particular in i18n situations). The downside is that the line sizing you get while doing that is often smaller than what good typography would call for.
- use an explicit (i.e. not `normal`) line size, and get a typographically desirable line size for their designated primary font, at the expense of losing the font-metrics based robustness.

Here are a few ideas that might address this:
1. allow calc in line-height, so that people can do `line-height: calc(1 + 2px)` as you said, as well as `line-height: calc(normal + 2px)`
2. Introduce a new `line-gap: <length>` property that gets added to the `line-height` (inherited, initial value 0)
3. change the grammar of `line-height` from `normal | <number> | <length-percentage>` to `normal | <number> | <length-percentage> <length>?` with the second value representing the line gap
4. combine 2 and 3 by having `line-gap: <length>` be a longhand of `line-height: normal | <number> | <length-percentage> <length>?` (we'd need to find a name for the other longhand)

I think I like option 3 (or 4) best.

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

Received on Wednesday, 3 June 2020 02:30:50 UTC