Bug 11688 - Inline !important CSS behaves wrong, specifically: <hr> margins
Summary: Inline !important CSS behaves wrong, specifically: <hr> margins
Status: RESOLVED DUPLICATE of bug 4128
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Blocker
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-24 09:54 PST by Alexei Svitkine
Modified: 2006-11-24 11:51 PST (History)
0 users

See Also:


Attachments
Test case (313 bytes, text/html)
2006-11-24 09:55 PST, Alexei Svitkine
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Svitkine 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.
Comment 1 Alexei Svitkine 2006-11-24 09:55:05 PST
Created attachment 11622 [details]
Test case
Comment 2 Matt Lilek 2006-11-24 11:51:47 PST

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