- From: Bert Bos <bert@w3.org>
- Date: Tue, 7 Dec 1999 22:50:39 +0100 (MET)
- To: www-style@w3.org
Peter S. Linss writes: > In the Mozilla engine you can use the 'ch' unit. ie: > div { width: 80ch; } > > This only works for certian horizontal measurements (I seem to remember > only widths, but I could be wrong) and only when there is a fixed width > font in effect for the formatting object, otherwise it is ignored. > > I believe this has been proposed (at least informally) for CSS3. You can > take this as a formal proposal if you want... Yes, it has been proposed, but never in enough detail. What is clear is that there are two reasons for wanting this unit: 1. styling monospace text (including TTY and ideographs) 2. styling braille What is not clear is how to define the unit. If the font is monospaced, then 'ch' has an obvious definition, at least for horizontal distances. But the question is what the fallback is if 'ch' is used for vertical distances, or for elements with a proportional font: a. it is an error and the declaration is ignored b. ch is (arbitrarily) defined as 0.5em c. ch is defined as the average width over certain (all?) glyphs d. ch is defined as the width of a normal space e. ch is defined as the width of a full-width ideograph f. combination of the above (with conflict resolution rules) g. ... If we take c-e, should the (actual) value of 'letter-spacing' be included in 'ch'? (Leads to cycle if somebody sets 'letter-spacing: 0.5ch'...) That would make setting certain styles of Japanese easier, since Japanese typography likes to specify line lengths in units of character cells. I'd very much like to get 'ch' into CSS3, because it is clearly useful, and it has been demanded by the accessibility groups for a long time. Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos/ W3C/INRIA bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Tuesday, 7 December 1999 22:41:00 UTC