Bug 11688

Summary: Inline !important CSS behaves wrong, specifically: <hr> margins
Product: WebKit Reporter: Alexei Svitkine <myrd>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Blocker    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Test case none

Alexei Svitkine
Reported 2006-11-24 09:54:16 PST
In all modern browsers, except Safari (tested with 10.4.8's shipping version, and nightly WebKit r17840), the following will display some amount of margin around a <hr> tag: <hr style="margin:7 0 7 0 !important; margin:0"> This acts in two ways. For browsers that understand !important, it applies the first margin, for everything else it applies the second styling. It appears that Safari handles !important incorrectly when it is inline. This produces the following results: Opera, Firefox, etc all render it with the !important margin, meaning a top and bottom margin of 7px. WinIE renders it with the other margin of 0px, but since its default hr comes with non-compliant padding, it looks the same as Opera and Firefox. Only in Safari, it behaves differently. That is, a 0px margin is applied, and therefore there is no margin at all around the <hr> because Safari doesn't have an extra implicit border on <hr> like WinIE. This behaviour should be addressed to support inline !important, and therefore behave like Firefox and Opera.
Attachments
Test case (313 bytes, text/html)
2006-11-24 09:55 PST, Alexei Svitkine
no flags
Alexei Svitkine
Comment 1 2006-11-24 09:55:05 PST
Created attachment 11622 [details] Test case
Matt Lilek
Comment 2 2006-11-24 11:51:47 PST
*** This bug has been marked as a duplicate of 4128 ***
Note You need to log in before you can comment on or make changes to this bug.