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

I apologize if you've seen this more than once. I've been having some  
e-mail problems that caused it to be sent from the wrong server.
--------------------------------

On Dec 31, 2008, at 4:41 PM, L. David Baron wrote:
>> Although I do think that it should perhaps say something like that  
>> for
>> what happens if the character is not in the text of the table cell (I
>> haven't tested that, but in the most common use case of decimal
>> alignment, I image end-edge would be preferred, if there is not
>> decimal/period/full-stop character).
>
> Agreed that it needs to say something.  (I vaguely remember brining
> that issue up many years ago.)  For that case, the start-edge is
> probably preferred, so you get:
>   $4.99
>  $50

I disagree about start-edge. Consider a column with decimal alignment  
styling, that may contain either decimals or integers, but usually not  
both in the same table. I that case, I would want the following  
(numbers with no decimal) to be right aligned:

       599
6,000,000
    20,272
         5

Useful especially when the numbers get tallied into some sort of  
total. This would most closely resemble the desired effect when the  
decimal is present:

       599.45
6,000,000.333334
    20,272.0
         5.123

(I used Courier New, a monospaced font, on the numbers above to try to  
simulate the effect of having the places of the numbers line up)

If the column contains a mix of numbers with and without decimals in  
the same table, then I think it is unlikely that there is any way to  
get them to line up nicely anyway, unless there was a new value of  
text-align:

text-align:decimal;
/* aligns on the localized version of the decimal character, similar  
to <string>, but with an invisible decimal character to the right of  
the text if the text has no decimal character of its own */


> I'd also note that how to align the character has to be specified
> anyway for the case of different cells that align the same character
> in different fonts (where that character has different widths).
> (The common realistic case here is probably changes in font-weight.)

Good point. I also don't see anything there about what to do if the  
alignment character appears more than once in the text.

Received on Thursday, 1 January 2009 04:08:22 UTC