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

NEW
Unassigned

Status

()

--
minor
16 years ago
9 years ago

People

(Reporter: vedran, Unassigned)

Tracking

({testcase})

Trunk
x86
All
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

16 years ago
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.

Comment 1

16 years ago
->Layout
Assignee: asa → other
Component: Browser-General → Layout
QA Contact: asa → ian

Comment 2

16 years ago
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.
(Reporter)

Comment 3

16 years ago
It was tested on WinXP, and on Camino on Mac. So, it's OS->All.
OS: Windows XP → All
(Reporter)

Comment 4

16 years ago
Created attachment 126249 [details]
Camino on MacOS

This is how it looks on MacOS and Camino.

I will try to find someone to recreate the testcase.
(Reporter)

Comment 5

16 years ago
Created attachment 126250 [details]
Testcase

Is this good enough?

Comment 6

16 years ago
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)

Comment 8

16 years ago
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')?
(Reporter)

Comment 9

16 years ago
Created attachment 126288 [details]
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.

Comment 12

15 years ago
Created attachment 142964 [details]
reduced testcase01

Comment 13

15 years ago
*** Bug 236495 has been marked as a duplicate of this bug. ***

Updated

15 years ago
Flags: blocking1.8a+
Flags: blocking1.7+

Comment 14

15 years ago
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
You need to log in before you can comment on or make changes to this bug.