Re: [css4-text] text-align: auto

Lea Verou <lea@verou.me>:

> Is there any other application of this kind of alignment, besides spreadsheets?

Any kind of data table, I would say. Outside tables, not so much.

> Also, this sounds like it would have the same perf issues as :content(), which was dropped.

As I described it, the value is more complex to implement than the existing ones, since it requires inspection of child nodes, but it’s much less complex than generic ‘:content()’. If a box was not a ‘table-cell’ it would immediately fall back to ‘start’, but still inherit, and in cells it uses ‘right’ but falls back to ‘start’ as soon as invalid content is encountered (or to ‘justify’).

Fantasai is right, though, that one would like this behavior also for other nodes with more complex contents, e.g.

  <td> <data value="1000"> 1 kg </data>

Spreadsheets don’t support units and unit symbols out of the box either (although they should), except for percent and (local) currency.

Received on Monday, 4 August 2014 14:01:14 UTC