W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css3-text] better way to do forced last-line justification

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 29 Nov 2012 09:45:03 -0800
Message-ID: <CAAWBYDDxunFFaLNuPdvMviWBeJG4+f7VAvgNYMD_Ubi2rw4+Cg@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: www-style list <www-style@w3.org>
On Wed, Nov 28, 2012 at 11:15 PM, John Daggett <jdaggett@mozilla.com> wrote:
> Alan Stearns wrote:
>> >But using a new property for this seems like overkill, there seem
>> >to be lots of combinations that have no real use case.
>> >
>> >  p {
>> >    text-align: justify;
>> >    text-align-last: center;
>> >  }
>>
>> I actually prefer this setting to text-align:center in some cases
>> where you want a visual centering without so many ragged line edges.
>> This does get used in figure captions where a single-line caption is
>> centered but a multi-line caption has lines justified to the figure
>> width, and the last line centered.
>
> Ah, very good point.
>
> Yet the full set of combinations of text-align/text-align-last still
> leaves lots of combinations for which I don't think there's a clear
> use case.

We established early on that there are more use-cases.  Some country's
poetic customs right-align the last line, for example.

Yes, there are some silly combinations.  But supporting them all costs
nothing over supporting the "good" ones that we already know have
use-cases, because the last line doesn't interact with the rest of the
paragraph.  Once you can left, right, and center the last line, you
can do so independently of what the rest of the paragraph is doing.
So, since there might be use-cases for the odd combinations that we
don't know, let's not create extra work for ourselves in disallowing
some combos.

~TJ
Received on Thursday, 29 November 2012 17:45:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT