Re: [csswg-drafts] [css-text] Allow letter-spacing to have unitless values like line-height

I was thinking about this problem just the other day, and was surprised this wasn't a solved problem already. Totally agree with the premise.

@tabatkins We could use percents here. It's inconsistent with how `line-height` works, but imho `line-height`'s use of percents is broken; we don't resolve them anywhere else.

An interesting question is whether the ratio should be relative to `em` or `ch`; imho we should go with `em` which is more fundamental, and once we have unit math `calc()` can be used to provide the other ratios.

So the proposal is that `letter-spacing` accept percentages, which inherit as percentages,  with `100%` = `1em` on the current element.

Then there's the question of what `word-spacing` should do. Currently a percentage on `word-spacing` multiplies the width of the affected word separator character (typically a space, but some scripts use a visible glyph, Ethiopic being the main one with contemporary use). Should we keep that definition or make it match `word-spacing`?

GitHub Notification of comment by fantasai
Please view or discuss this issue at using your GitHub account

Received on Friday, 5 January 2018 11:01:04 UTC