Mozilla Quirks Mode Behavior
From MDC
The following is a rough list of the differences that exist between Mozilla's standards mode and quirks mode behavior. This list is current as of early June 2001 (with a few additions since then, but not a complete list of the changes since then). Since that time the most significant change has been that many of the form control-related quirks have been removed. Another often-noticed change is that, in standards mode, we reject CSS stylesheets that have a MIME type other than text/css.
Contents |
[edit] Miscellaneous & Style
- All of the style rules in
layout/style/quirk.cssapply. - In quirks mode css class names are case insensitive. In standards mode they are case sensitive.
- Stylesheets linked in the document with an advisory mime type of
text/csswill still be treated as CSS even if the server gives aContent-Typeheader other thantext/css. - The CSS parser accepts colors not beginning with
#. - The CSS parser interprets unitless numbers as
px(except forfont-sizebecause that was what Netscape Navigator 4 did, and except forline-heightand any other properties where they have distinct meaning). - HTML colors are parsed differently (
#is not required, and missing digits are filled in differently) - An empty string for the
backgroundattribute sets the background URL to empty only in quirks mode. - System fonts work differently in navquirks mode (shouldn't the form controls that use them be the ones working differently instead?).
- HTML (1-7) and CSS (
xx-small-xx-large) font sizes are calculated slightly differently (see bug 18136). - List bullets do not inherit the font size of the list in quirks mode.
- The
:hoverpseudoclass will only be applied to links, images, and form controls, unless the selector includes tag names, ids, or attributes.
[edit] Block and Inline layout
- [This quirk is present in almost standards mode.] Line height (not
line-height) calculations are different to fix bug 5821 and bug 24186 (some other issues are described in bug 22274). - There are a bunch of quirks to get percentage heights on images, tables, objects, and applets (etc.?) to "work" (the way they did in Netscape Navigator 4), even though CSS says that percentage heights should behave like 'auto' heights when the parent element doesn't have a fixed height. See bug 33443#c9. See also bug 41656 and its duplicates. Some of these quirks may cause other effects (see bug 54119).
- The
HRelement is treated differently in quirks and strict mode (and arguably wrong in both).
[edit] Tables
- Table background colors work differently (see bug 4510) It is not clear that this quirk is needed. [That quirk has been removed]
- In quirks mode
absmiddle(handled incorrectly?) andmiddle(perhaps incorrectly as well?) are accepted as values ofalignon table cells, andabsmiddle,abscenter, andmiddleare supported on tables (treated the same ascenter). -
TD,TH,TR,THEAD,TBODY, andTFOOTelements have the document background (and color?) applied to them (when the document background is specified in certain ways?) (see also bug 70831 ). - The
empty-cellsproperty defaults tohidein quirks mode but show (according to CSS2 errata) in strict mode (see bug 33244) (though the correct fix would be to specify it on the HTMLTABLEelement inquirk.css). - In quirks mode floated tables never move to the next "line" if they don't fit next to other floats, they just keep widening the page (see bug 43086).
- In quirks mode
colspan="0"androwspan="0"are intentionally not handled as described in HTML4. -
hspaceandvspaceare supported onTABLEonly in quirks mode. - In quirks mode, when tables have a border style of
insetoroutset, the border color is based on the background color of the table or of the nearest ancestor with non-transparent background. - In quirks mode table cells with a border have a minimum width of one pixel.
- Starting with Gecko 1.8 (see bug 277232): In quirks mode a fixed width specified on a table cell resets the
nowrapattribute. If thenowrapattribute is present the cell width will never be smaller than the specified fixed width. - The basic table layout strategy ignores padding (on what) in quirks mode.
- The basic table layout strategy handles widths differently in some way.
[edit] Forms
- Button inputs calculate their size differently.
- In standard mode a
BUTTONelement (?) can submit only if it lacks atypeattribute. - Text inputs (and other form controls containing text???) calculate their size differently
- The fonts for button
INPUTelements andSELECTelements are computed differently. - The requirement of HTML that one button in a radio group is always selected (by default) is not enforced in quirks mode.
[edit] Frames
- In quirks mode
marginwidthandmarginheighton aFRAMEare propagated to the containedBODY. - In a frame size specification
0*is treated as1*(see bug 40383). - The
scrollingattribute onFRAMEis handled differently.
[edit] HTML Parser
- In quirks mode, we parse HTML comments in a way compatible with older browsers instead of treating "
--" as the comment start and end delimeter
[edit] Original Document Information
- Author(s): David Baron, Boris Zbarsky
- Last Updated Date: July 8, 2003