Open
Bug 516192
Opened 17 years ago
Updated 4 years ago
margin-collapse issue with html5 elements in presence of list-marker
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
NEW
People
(Reporter: phiw2, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
|
821 bytes,
text/html
|
Details |
testcase: there should be no red on this page (I think…)
A <article> element nested in a <li> contains a <p> with margin: 20px 0;.
The margin-top collapses through with the previous block (correct), but there is also a margin inside the <article> element
Issue started with changeset:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bc6ffc794fc1&tochange=bf206df7eff9
(Bug 179596 / Bug 507187)
improved (list-style: none does not show the issue) with changeset
http://hg.mozilla.org/mozilla-central/rev/3d331523f2ad
(bug 512631)
WebKit nightly: the margin on the nested p collapses through
Opera 10: the margin on the nested p collapses through, although the list-marker is misaligned
IE 8 has no support for those html5 elements
Is the HTML parser doing something weird here?
| Reporter | ||
Comment 2•17 years ago
|
||
(actually valid testcase ... <sigh>)
Attachment #400313 -
Attachment is obsolete: true
So I think what's happening here is:
* article is an inline element, and our block-inside-inline code therefore splits it into three parts
* we decide the list item goes next to the first (inline) part, which now makes the line containing that first part non-empty, and thus gives us a margin above the p
The way to fix this would be to end up knowing that the bullet is next to the second (block) part of the article instead. Prior to bug 179596 / bug 507187 we presumably had the same association issue, but didn't consider the first line non-empty, which would mean that if the p inside had a different font size we'd still have been mis-aligning the bullet with its text.
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•