Closed Bug 299721 Opened 19 years ago Closed 19 years ago

text-align: justify doesn't work in conjunction with white-space: -moz-pre-wrap

Categories

(Core :: CSS Parsing and Computation, defect)

1.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jmorkel, Assigned: dbaron)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

If a section of a web page has alignment set using a stylesheet to justify at
the same time as having word wrapping set using white-space: -moz-pre-wrap then
the text alignment is shown up with the default left alignment.

Will this be resolved when CSS 2.1 support (i.e.: white-space: pre-wrap) is
implemented?

Reproducible: Always

Steps to Reproduce:
1. Create a section of text that is long enough to wrap in the browser window
and that contains carriage returns and other white space.
2. Enclose this text in a <DIV> tag and set the class for the tag to a
particular stylesheet class.
3. Define the abovementioned stylesheet class as follows:
.myclass {
  text-align: justify;
  white-space: -moz-pre-wrap;
}
Actual Results:  
The section of text wraps correctly but is left aligned rather than justified.

Expected Results:  
The text should wrap and still be justified.
From:
http://www.w3.org/TR/CSS21/text.html#alignment-prop

"
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.
"

So I think this is invalid.
Assignee: nobody → dbaron
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.0 Branch
INVALID, see comment 1
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Blocks: 1253840
You need to log in before you can comment on or make changes to this bug.