W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

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

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Fri, 05 Jan 2018 11:00:43 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-355528653-1515150042-sysbot+gh@w3.org>
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 https://github.com/w3c/csswg-drafts/issues/2165#issuecomment-355528653 using your GitHub account
Received on Friday, 5 January 2018 11:01:04 UTC

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