W3C home > Mailing lists > Public > www-style@w3.org > March 2016

Re: [css-values][css-writing-modes] ch and ic units

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 10 Mar 2016 13:21:15 -0800
Message-ID: <CAAWBYDBwhOSsexE_h1NBPaH1W+Dj8j11ZT4iSkYyhN6EwXMN+Q@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style list <www-style@w3.org>
On Sun, Mar 6, 2016 at 2:00 AM, Florian Rivoal <florian@rivoal.net> wrote:
> 2) "advance measure", as used in the definition of both the ch and ic units isn't defined, and we need to clarify how it works in vertical writing modes. Since they are typically used to set the inline size of something in terms of a number of characters, it would makes sense to me in
> - in "writing-mode:sideways-*" or "writing-mode:vertical-*;"text-orientation:sideways", advance measure for both units means advance width
> - in text-orientation:upright, advance measure for both units means advance height
> - in text-orientation:mixed, ch should use the advance width, which ic should use the advance height.
>
> Quick tests (http://jsbin.com/fuqagij/edit?html,css,output) show that
> - Safari and Firefox almost do this (except they put mixed with upright)
> - Chrome always uses the advance width
> - IE/Edge used adavance width in mixed mode, and as far as I know does not support the other text-orientations.

Defined - it's the advance of the glyph in the element's inline axis.

> 3) If we pick the suggested definition for advance measure, we should probably amend the definition of the ch unit, so that with  "writing-mode:sideways-*" or "writing-mode:vertical-*;"text-orientation:sideways" and if it is impossible or impractical to determine the measure of the "0" glyph, the fallback should be 1em rather than 0.5em.

Given our definition above, we only need to do this for
text-orientation:upright, according to fantasai.  That's now done.

~TJ
Received on Thursday, 10 March 2016 21:22:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC