Bug 11785 - :last-child clobbers bottom margin
Summary: :last-child clobbers bottom margin
Status: RESOLVED DUPLICATE of bug 5468
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 419.x
Hardware: Mac (PowerPC) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://darwinweb.net/article/Safari_M...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-08 12:20 PST by Gabe da Silveira
Modified: 2006-12-08 12:53 PST (History)
0 users

See Also:


Attachments
HTML/CSS test case (631 bytes, text/html)
2006-12-08 12:40 PST, Gabe da Silveira
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabe da Silveira 2006-12-08 12:20:34 PST
If a block has a last-child selector with a bottom margin, the block's own bottom margin will not be considered for the collapsing margins even if it is larger than any of the other candidate margins.

Note that this behaviour is not always apparent and can be corrected by changing the font size.
Comment 1 Gabe da Silveira 2006-12-08 12:40:20 PST
Created attachment 11776 [details]
HTML/CSS test case
Comment 2 mitz 2006-12-08 12:53:32 PST
:last-child is seriously broken in WebKit, and in fact matches all children, as one can see by adding 'background: red;' to the .bar:last-child rule in the test case at http://darwinweb.net/content/safari-last-child-margin-bug.html

*** This bug has been marked as a duplicate of 5468 ***