Bug 11785

Summary: :last-child clobbers bottom margin
Product: WebKit Reporter: Gabe da Silveira <gabe>
Component: CSSAssignee: Nobody <webkit-unassigned>
Severity: Normal    
Priority: P2    
Version: 419.x   
Hardware: Macintosh PowerPC   
OS: OS X 10.4   
URL: http://darwinweb.net/article/Safari_Margin_Bug
Description Flags
HTML/CSS test case none

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 ***