Re: [CSS21][css3-text] letter-spacing, word-spacing and justification

On 5/10/13 7:17 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

>On 01/16/2013 07:41 PM, MURAKAMI Shinyu wrote:
>> I often see the following CSS code, I think this has a problem:
>>
>> p {
>>    letter-spacing: 0pt;
>>    word-spacing: 0pt;
>>    text-align: justify;
>> }
>>
>> In the CSS2.1 and CSS3 Text, the initial value of letter/word-spacing is
>> 'normal', stretchable in justification, and different from the fixed
>> value 0pt. [...]
>>
>> My questions:
>> - Is my understanding of the spec correct?--If the value of
>>letter/word-spacing
>> is '0pt', the <spacing-limits> is optimum=minimum=maximum=0pt and
>>cannot be
>> stretched in text justification.
>>
>> - I tested major browsers with the following samples and found that they
>>   stretch the fixed value spacing, the value '0pt' is treated like
>>'normal'.
>>   Is this behavior wrong and should be corrected? (or the CSS spec is
>>wrong?)
>
>Your understanding of the spec is correct, but Koji and I think that
>the spec will need to be changed here.
>
>Our proposal...
>
>Part I: letter-spacing: <length> allows justification
>
>   This solves backwards-compatibility with such style sheets as you
>mention,
>   and is also consistent with implementations.
>
>   It is also consistent with how 'word-spacing' behaves: <length> values
>   there allow justification.
>
>   (Note: This would be a change from CSS2.1, so will need to be
>backported.)
>
>Part II: Add 'fixed' keyword to disallow justification
>
>   We have a problem if we allow justification for letter-spacing always;
>   German typesetting rules requires that it not be allowed! So here is
>   a proposal --
>
>     letter-spacing: normal | <length> || fixed
>
>   If 'fixed' keyword is specified, then justification cannot alter
>   letter-spacing, only word-spacing.
>
>I think Part I is important to take. I am open to other suggestions to
>solve the use case in Part II...
>
>~fantasai

I am fine with this proposal, but I think we should take both parts I and
II. And we should mention that setting letter-spacing defines a minimum
letter spacing and justification can only increase the spacing.

Thanks,

Alan

Received on Wednesday, 26 June 2013 16:57:26 UTC