W3C home > Mailing lists > Public > www-style@w3.org > August 2014

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

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 4 Aug 2014 09:26:28 +0200
Message-Id: <4E58572F-19E5-4F7F-88DB-1D28F55C435A@crissov.de>
To: www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 4 August 2014 07:27:04 UTC