Re: CSS 2.1 text-align:justify issue [CSS2.1] [css3-text]

Robert O'Callahan wrote:
 >> Sounds good, but why include 'pre-line' there? IMHO spaces in pre-line
 >> text should be able to stretch for justification.
 >
 > Good point. That should not be there!

Here's an updated proposal based on Arron's tests that show that pre-wrap
disables justification but pre-line doesn't (which makes sense):
   http://wiki.csswg.org/spec/css2.1#issue-53

In 16.2, replace

   #  If the computed value of text-align is 'justify' while the computed
   #  value of white-space is 'pre' or 'pre-line', the actual value of
   #  text-align is set to the initial value.

with

   |  If an element has a computed value for 'white-space' of 'pre' or
   |  'pre-wrap', then neither the glyphs of that element's text content
   |  and white space must not be altered the purposes of justification.

The other paragraph that we may need is this:

   |  If the computed value of 'text-align' is 'justify' and the computed
   |  value of white-space is 'pre' or 'pre-wrap', then the actual value
   |  of 'text-align' is set to the initial value.

Whether we add it or not depends on whether the following should be
allowed
to justify:

<p style="text-align: justify; white-space: pre"><span style="white-space:
normal">Some text here</span></p>

(We have split results for implementations.)

~fantasai

Received on Wednesday, 31 March 2010 18:43:12 UTC