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

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 UTC