- From: Josef Schmid <e9427749@student.tuwien.ac.at>
- Date: Fri, 09 Jan 2009 18:42:33 +0100
- To: www-style@w3.org
-------- Original-Nachricht -------- Betreff: Disadvantages of ch unit (was: stability of root em unit spec) Datum: Wed, 07 Jan 2009 21:35:14 +0100 An: www-style@w3.org Hi , all! Maybe this is discussed/mentioned before by others. In that case i apologize for wasting bandwidth. I wrote: [some stuff against 're', and a idea for general unit extension] > And instead of 'ch', 'width of "0"'. > (So as special case, you can write 'width of "m" from :root' ;-) In the spec: | The width of the "0" (ZERO, U+0030) glyph found in the font for the | font size used to render. If the "0" glyph is not found in the font, | the average character width may be used. At first) the 'average char width' can be far from the width of "0". Depending of the used font and the capabilities of the browser, this can produce very different results. (For chinese fonts this is typically near factor 2). At second) Depending of the language and the font used. The width of "0" say nothing about the average char width. Even not about the average digit width. In the case you know the factor (for example kanji & fullwidth chars), this is cumbersome. (U+FF10) But for most you don't know. If you need it only for digits, than for languages with own digit glyphs it does not help. (Even in the case of western language, you have often medial digits (U+1D7E2??) and mathematically monospaced digits (U+1D7F6) also.) I thing the simplest solution is to allow the web developer to specify the char. Also useful is the possibility of width from a string. So i like to propose: * width of <string>, where string is in single or double quotes. * height of <string> In both case it is the needed spaced, and the value depend on block-progression, font-size, and other font properties. I know units with spaces and variable parts are new in CSS, but i think if we want such units like ch & rem, than the expressiveness should be extend. (Not doing the same fault as PHP, which ended up with ~20 different sort keywords.*) > Sorry for my bad English [, again]. jm2c, Jos (btw. What you think about 'e0' as unit name? ;-) ef ad *) Sorry, hopefully i don't start a programming language flame war.
Received on Friday, 9 January 2009 17:43:34 UTC