Closed
Bug 162170
Opened 24 years ago
Closed 24 years ago
Marker aligned perversely when table is first child of list-item
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: ed, Assigned: attinasi)
Details
(Keywords: qawanted)
Attachments
(2 files, 2 obsolete files)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020810
BuildID: 2002081004
While researching some layout bugs, I discovered something very strange in how
Mozilla aligns list markers. When the first child of a <li> element is a table,
instead of aligning the list marker with the top of the table, as one would expect:
For the :before pseudo-element, the baseline of text in the marker box will be
vertically aligned with the baseline of text in the first line of content in the
principal box. If the principal box contains no text, the top outer edge of the
marker box will be aligned with the top outer edge of the principal box.
http://www.w3.org/TR/REC-CSS2/generate.html#markers
the marker is aligned with the bottom of the table (roughly speaking - it looks
like the middle of the marker is level with the bottom of the table), which
looks very strange indeed!
Now, I accept that the above quote is on markers, not lists, and that the
positioning of list markers is actually undefined:
Note. CSS1 did not specify the precise location of the marker box and for
reasons of compatibility, CSS2 remains equally ambiguous.
http://www.w3.org/TR/REC-CSS2/generate.html#propdef-list-style-position
but the way it works at present looks simply wrong.
Reproducible: Always
Steps to Reproduce:
I will attach a testcase.
Interestingly, Internet Explorer does the same as Mozilla (aligning the list
marker at the bottom of the table) but Opera handles this 'correctly'.
The testcase is self-explanatory (I hope!)
I have used an ordered list to aid with discussion; an unordered list behaves
the same.
Comment 2•24 years ago
|
||
Apparently, Mozilla is considering the whole table as one line. I agree the the
"first line of content" should be the first row in the table (or the caption),
not the whole table. This is probably a duplicate, but I can't find any dups.
> Apparently, Mozilla is considering the whole table as one line.
This isn't quite what is happening - note the difference between examples 1 and
2 in this attachment. What I think is going on is that Mozilla is going for the
first child of the <li> node, finding its baseline (or bottom) and then
aligning thye marker with that.
the testcase (first anyway) fails horribly at the HTML Validation.
http://validator.w3.org/check?uri=http%3A%2F%2Fbugzilla.mozilla.org%2Fattachment.cgi%3Fid%3D94832%26action%3Dview&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=
could you please try something that validates?
Sorry about that - had a broken HTML template in place.
Attachment #94832 -
Attachment is obsolete: true
Similar problem. I will try to pre-validate all my uploads in future! :)
Attachment #94860 -
Attachment is obsolete: true
Comment 7•24 years ago
|
||
Confirming. Opera 6 does not exhibit this but I am under the impression that the
list marker is set to align to baseline of what's inside the tag in Moz (the
part of the CSS spec is apparently ambiguous so the behaviour that IE and Moz
are showing isn't actually wrong).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•24 years ago
|
||
This is probably a duplicate. Basically, we don't correctly handle list markers
at all, and we don't always correctly handle empty inlines. Together the
problems show the bugs seen in the test cases.
Comment 9•24 years ago
|
||
*** This bug has been marked as a duplicate of 54979 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•