W3C home > Mailing lists > Public > www-style@w3.org > April 2006

[CSS3 Text] Aligning numbers in a table column

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 13 Apr 2006 14:57:34 -0400
Message-ID: <443E9F1E.6090403@inkedblade.net>
To: www-style@w3.org

Lining up numbers on the decimal point in a table column is
very common in pretty much any publishing format that supports
data tables, and even though the presentational markup for it
goes back to HTML 4 at least, and the feature also specified in
CSS2, there aren't any browser implementations. It therefore
isn't in CSS2.1. It should be part of CSS3.

Markus suggests that the CSS3 Text spec should specify it, but
should specify the exact behavior in more detail than in CSS2.
For example, what happens if the line has no occurrences of the
alignment character, or if it has more than one, or if the text
wraps to more than one line.

Another issue is where in the column the characters should line
up, if there's extra space. For example, in a column with a very
wide heading that only has short numbers in the data cells:

  Really Wide Heading      | More Data     |
  23.1                     | 19.02         |
  24.20                    | 83.9          |
  9.2                      | 3.1           |
  0.356                    | 8             |

We could always keep the content near the start edge, e.g.

  Really Wide Heading      | More Data     |
  23.1                     | 19.02         |
  24.20                    | 83.9          |
   9.2                     |  3.1          |
   0.356                   |  8            |

But, from my recent experience typesetting lab data, it would be
more useful if we can also specify the alignment of the set as a
whole. For example, if the heading is centered, I'd want the data
centered, too.

this:

     Really Wide Heading   |   More Data   |
            23.1           |     19.02     |
            24.20          |     83.9      |
             9.2           |      3.1      |
             0.356         |      8        |

not this:
     Really Wide Heading   |   More Data   |
  23.1                     | 19.02         |
  24.20                    | 83.9          |
   9.2                     |  3.1          |
   0.356                   |  8            |

So I think if CSS3 Text specifies character alignment, it should allow
the character-aligned text to be shifted as a whole left, right, or center.

~fantasai
Received on Thursday, 13 April 2006 18:57:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:44 GMT