- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Tue, 30 Dec 2008 14:36:50 -0800
- To: CSS mailiing list W3C <www-style@w3.org>
- Message-Id: <A61CE5AF-F663-40B5-A02D-94E15C3685EE@gmail.com>
In CSS3 Working Draft for CSS Text, in the part about text alignment[1], there is a description of text-align:<string>, quoted below: <string> When applied to a table cell, specifies a character on which all cells in its table column that also have a character value for 'text-align' will align (see the section on horizontal alignment in a column for details and an example). When applied to any other element, it is treated as 'start'. The string must be a single character; otherwise the declaration must be ignored. 1. The section on horizontal alignment in a column that it links to does not have details and an example, however. It only has the sparse wording of "The horizontal alignment of a cell's content within a cell box is specified with the 'text-align' property", and links back to the the section in the CSS Text draft that links to it. 2. Also, I don't know if it has been brought up before or not, but when text-align:<string> is applied to a non-table-cell, shouldn't it just be ignored, instead of being treated as "start"? That seems like it would allow for more reasonable fallback behavior. Thus, if I class something to align on a decimal in a table cell, I might want it to be right aligned if that class was applied to something other than a table cell, and I could put that in the rule like this: { text-align:right; text-align: '.'; } Which is what I would probably do anyway if the cell contained dollar amounts that usually showed two decimal places, as it would also help in getting the alignment to be consistent in UAs that did not yet support string alignment. 3. Shouldn't "When applied to a table cell" be replaced by "When applied to a table cell, table column, or table column group"? Is is it considered to be inherited from those, and thus "applied" indirectly? This seems like the wording in #2 (above) also comes into play: if I apply text-align: '.' to a TABLE element, should it be inherited by the TDs of that table? If it is "treated as 'start'", then the TDs would inherit it as 'start' also, wouldn't they? 4. Shouldn't "that also have a character value for 'text-align' will align" be replaced by "that also have the same <string> value for 'text-align' will align"? After all, some cells in the column could align to some other character, couldn't they (if they had a different class, for instance)? I propose this alternate wording: <string> When applied to a table cell, table column, or table column group, the string specifies a character on which all cells in its table column that also have the same <string> value for 'text-align' will align. When applied to any other element, it must be ignored by that element as if it were an unsupported value (but not by its decedent elements, which may still inherit the character alignment). The string must be a single character; otherwise the declaration must be ignored. [1] http://www.w3.org/TR/css3-text/#text-align
Received on Tuesday, 30 December 2008 22:37:33 UTC