W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [CSS3] CSS Text Level 3, 6.1: text-align: string

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 13 Jan 2009 18:52:33 -0800
Message-ID: <496D5371.1090301@inkedblade.net>
To: Brad Kemper <brad.kemper@gmail.com>
CC: CSS mailiing list W3C <www-style@w3.org>

Brad Kemper wrote:
> 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> <http://www.w3.org/TR/CSS21/syndata.html#value-def-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
>     <http://www.w3.org/TR/CSS21/tables.html#column-alignment> 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
>     <http://www.w3.org/TR/CSS21/conform.html#ignore>.
> ...
> 
> 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: '.'; }

Can't do that. The cascade happens before style computation.
But what we /could/ do is to allow both a keyword and a string.

td { text-align: right '.'; }

This would also give control over what happens when there's lots
of extra room in the cells, or when the alignment string doesn't
appear in the text.

~fantasai
Received on Wednesday, 14 January 2009 02:53:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT