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

Alan Stearns <stearns@adobe.com> wrote on 2013/01/22 1:10:36
> On 1/21/13 5:44 AM, "MURAKAMI Shinyu" <murakami@antenna.co.jp> wrote:
>...
> >In my understanding, "should also avoid exceeding ..." in the spec
> >means nearly "not allowed".
> 
> The use of "should" is technical - see the definition [1]. It's
> recommended that the spacing constraints are not broken, but when they
> have to be, it's the maximum limit that's exceeded. If this were not
> allowed, the spec would say "must not violate the maximum"
> 
> >Please note that the spec also says:
> >"If the inline contents of a line cannot be stretched to the full
> >width of the line box, then they must be aligned as specified by the
> >'text-align-last' property."
> 
> I see the problem with this now. I interpret this sentence to apply to
> circumstances where there are no expansion opportunities in the line (for
> example, a line that contains a single glyph or a single inline image). If
> I'm correct, then this sentence should be re-worded to make this clear.
> 
> >
> >The initial value 'auto' of text-align-last is same as 'start'
> >when text-align is 'justify', and if all letter/word-spacing in
> >the inline contents of a line has optimum=minimum=maximum=0pt,
> >it cannot be stretched and the result will be same as text-align:start.
> >
> >So I raised the question:
> >>> - 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?)
> >>> https://dl.dropbox.com/u/64715801/word-spacing-justify.html
> >>> https://dl.dropbox.com/u/64715801/letter-spacing-justify.html
> 
> I think the behavior is correct (at least in the Roman case - there may be
> subtleties in Japanese justification I'm missing). The spec should be
> clear that the "cannot be stretched" sentence you quote above does not
> apply to these test cases.

I agree that the current browsers' behavior is reasonable (also in 
Japanese justification). We usually expect justified text with 
letter/word-spacing value other than 'normal'.

But in my understanding of the spec, this behavior is obtained by 
the syntax like,
    word-spacing: 10pt normal; /* optimum=minimum=10pt; maximum=normal */

The current CSS3 Text spec :
    <spacing-limits> = [ normal | <length> | <percentage>]{1,3}

    If three values are specified, they represent the optimum, minimum, 
    and maximum in that order. 
    If only two values are specified, then the first represents both the 
    optimum and the minimum, and the second represents the maximum. 
    If just one value is specified, then it represents the optimum, 
    minimum, and maximum. 

Perhaps, it would be better to change the spec as like:
    ... If just one value is specified, then it represents the optimum 
    and minimum, and the maximum value is set to 'normal'.

I don't need this change if it is clarified so that the maximum limit
is not absolute and can be stretched exceeding that value.

Regards,

Shinyu Murakami
Antenna House

Received on Wednesday, 23 January 2013 08:40:42 UTC