CSS3 Text: text alignment and justification

CSS3 Text, Section 4.1
http://www.w3.org/TR/2003/WD-css3-text-20030226/#alignment-prop

  # left, right
  #    In horizontal inline-progression, the text is aligned
  #    on the left or right respectively. In vertical inline-
  #    progression, the alignment is UA dependent. Because
  #    these two values are not related to the current inline-
  #    progression, the values 'start' and 'end' are typically
  #    preferred.

The alignment should not be UA dependent in vertical inline-
progression. It should be defined as follows:
   In vertical inline-progression, the alignment should be
   interpreted relative to the block progression. That is,
   if the block progression is right-to-left, 'left' means
   "the top of the block" and 'right' means "the bottom of
   the block". In left-to-right block progression, 'left'
   means "the bottom of the block" and 'right' means "the
   top of the block".

You can see why this makes sense if you turn a vertical flow
document (such as this email) sideways to make it flow
horizontally:

   LEFT                   ||                            RIGHT
                         _||_
                         \  /   -- direction of block progression
                          \/

If you turn this page so the arrow points from right to left,
'LEFT' will be at the top, and 'RIGHT' will be at the bottom.
If you turn it again so the arrow points from left to right,
'LEFT' will be at the bottom, and 'RIGHT' will be at the top.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

CSS3 Text, Section 4.2

There seems to be no justification option that enables kashida
for Arabic, word-spacing for Latin, and letter-spacing for CJK.
IMHO, this would be the best combination for a primarily Arabic
text that includes some CJK. Maybe change kashida to allow
letter-spacing for CJK?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

CSS3 Text, Section 4.3
http://www.w3.org/TR/2003/WD-css3-text-20030226/#last-line-alignment-prop

  # This property describes how the last line of the inline
  # content of a block is aligned. This also applies to the
  # only line of a block...
  #
  # relative
  #   If the 'text-align' property is set to the value
  #   'justify', the last line will be aligned to the
  #   start of the inline-progression. If the 'text-
  #   align' property is set to any other values, the
  #   last line alignment will be determined by the
  #   value of the 'text-align' property.
  #
  # start, end and center
  #   Start, end and center text respectively.
  #
  # justify
  #   The last line will be justified according to the
  #   'text-justify' property value. However, if there
  #   is no expansion opportunity in the last line, the
  #   line might not appear justified.
  #
  # size
  #   The line content is scaled to fit on the line. All
  #   the fonts on the line must be scaled by the same
  #   factor. Typically this value is used for single
  #   line element. Finally, this value, unlike the
  #   others, may change (i.e. decrease) the number of
  #   lines in a block element.


I'm not sure what the intended use case is for this,
other than with text-align: justify. I can't imagine
anyone wanting to have the last line of a start-aligned
block be centered, or justified, or 'size'ed. However,
I'm sure it would be useful to justify the last line,
or center it, or 'size' it *if the rest of the block
is justified*. And if a later rule overrode
"text-align: justify", I would not want the last line
alone to remain justified.

Therefore, I propose that 'text-align-last' only take
effect if 'text-align' is 'justify'; otherwise the
last line is to be aligned as specified by 'text-align'.

Proposed changes:
   Add "when 'text-align' is set to 'justify'" to the end
   of the first sentence and take out the sentence beginning
   "Depending on the value of the property..." (The
   dependency on 'text-justify' is covered in the value
   description.)

   (The comma after "XHTML context" should be deleted, too.)

   Alternatively, you might want to replace that paragraph
   with the following text:
     This property specifies the alignment of the last line
     in a block of text when 'text-align' is 'justify'. It
     applies to the last line of inline content in a block,
     the line preceding a br element in XHTML context, the
     line preceding a preserved linefeed, and the last line
     of anonymous blocks. If 'text-align' is set to any
     other value, the last line alignment will be determined
     by the value of the 'text-align' property.

   Take out the 'relative' value, as it's now redundant with
   'start', and change the initial value to 'start'.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  Christophe Päper commented (comment # 12):
   > Are min- and max-font-size only of use in conjunction
   > with text-align-last: size?

  The reply was:
   | Also commented by Bert Bos. Yes, the restriction
   | mentioned is valid and made more explicit. Generalizing
   | the effect is beyond the scope of the LC.

  Will the restricted definition of min/max-font-size in CSS3
  Text preclude generalizing its use in later specs?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

CSS3 Text, Section 4.5
http://www.w3.org/TR/2003/WD-css3-text-20030226/#text-justify-trim-prop

  # Name: text-justify-trim
  # Value: none | punctuation | punctuation-and-kana
...
  # punct-and-kana
  #    Space compression is allowed on wide-cell punctuation
  #    and wide-cell Kana glyphs.

The names don't match.
Also, I was wondering if it mightn't be better to specify it like this:

   Name: text-justify-trim
   Value: none | [ punctuation || kana ]

If you ever want to add to the list, this syntax would be more
accomodating.

~fantasai

Received on Thursday, 6 March 2003 05:19:37 UTC