Open Bug 197716 Opened 23 years ago Updated 3 years ago

Spaces at end of lines affect centering (text-align: center, trailing whitespace)

Categories

(Core :: Layout: Block and Inline, defect)

x86
All
defect

Tracking

()

People

(Reporter: vedran, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 According to W3C it shouldn't cause alignment problems, but it does. Reproducible: Always Steps to Reproduce: 1. Go to the page http://24.125.90.54/ Actual Results: Alignment is not correct, the images aren't in one row. Expected Results: They should all be in the same row.
->Layout
Assignee: asa → other
Component: Browser-General → Layout
QA Contact: asa → ian
I can't connect to the site and there is no testcase here. Unless the site comes online or someone can construct a testcase from memory this bug will be marked invalid.
It was tested on WinXP, and on Camino on Mac. So, it's OS->All.
OS: Windows XP → All
Attached image Camino on MacOS
This is how it looks on MacOS and Camino. I will try to find someone to recreate the testcase.
Attached file Testcase (obsolete) —
Is this good enough?
Sure, that's a good testcase. I'm not convinced this is a bug though. On the first and third line there is non-ignorable whitespace. You can see this if you "Select All". This is what causes the images to not align. The only whitespace that should be ignored is a single linefeed after a start tag or before an end tag, all other consecutive whitespace are compressed into single space that should not be ignored. (There is known bug on the linefeed bit (bug 2750) but I don't think that matters for your testcase.) I see that IE aligns the left edge of the images even though it also has a space after the first and third image, this seems like a bug in IE to me.
Severity: normal → minor
Keywords: testcase
Looks valid to me. Those spaces shouldn't be having any effect in white-space: normal blocks.
Assignee: other → block-and-inline
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Block & Inline
Ever confirmed: true
Summary: Different positions of line breaks causing weird alignment problems. → Spaces at end of lines affect centering (text-align: center, trailing whitespace)
Ian, are you saying the spaces should be ignored or that they somehow should not be part of the line width calculation (and thus not influence the x position of the line under 'text-align: center')?
Attached file Improved testcase
Removing unneeded things, making diffrence in code more obvoious.
Attachment #126250 - Attachment is obsolete: true
Spaces at end of white-space:normal lines should be collapsed away. See http://www.w3.org/TR/css3-text/#white-space-processing
I don't think that's compatible with existing implementations (at least for some things), although I guess we could do it in standards mode.
Attached file reduced testcase01
*** Bug 236495 has been marked as a duplicate of this bug. ***
Flags: blocking1.8a+
Flags: blocking1.7+
only drivers can set blocking flags
Flags: blocking1.8a+
Flags: blocking1.7+
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: