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

fantasai <fantasai.lists@inkedblade.net>:
> On 08/01/2014 01:10 PM, Christoph Päper wrote:
>> I’d like to propose an ‘auto’ value for the ‘text-alignment’ property.
>> If there are only textual/inline children and if these only contain
>> digit, punctuation and space characters calculate to ‘right’ (‘end’?),
>> but as soon as another type of characters is encountered calculate to
>> ‘start’, otherwise calculate to ‘justify’ (…).
>> This behavior may be limited to certain boxes, e.g. those with
>> ‘display’ set to ‘table-cell’ and certain others.
> 
> This seems reasonable, but it's a bit more complicated than you say:
> for example, there are various units that use letters, that should
> also be right-aligned.

Well, my description hopefully fulfills the Pareto principle (or 80:20 rule). The single ruleset

  td {text-align: auto;}

would lay out a lot of tables much nicer automatically than by default. The same result could be achieved with a lot of ‘:nth-’ or ‘+’ selectors or explicit markup, but each table would require individual treatment. Cells with value and non-symbolic unit, which are most except for some currencies and percentages, like

  <td> 1 kg

should probably not be in scope of this value, except if we added another value or property to make some text be ignored, e.g. ‘none’ as in

  <td> 1 <abbr>kg</abbr>

  td abbr {text-align: none;}

> It's a nice idea, but probably not something that's a high priority
> to address right now.

That’s okay. I tagged it with level 4 of css-text since that’s a long way down the road as far as I know.

Received on Monday, 4 August 2014 07:27:04 UTC