The following is a rough list of the differences that exist between Mozilla's standards mode and quirks mode behavior.
Miscellaneous & Style
- All of the style rules in
layout/style/quirk.cssapply only in quirks mode:- Orphaned
LIhas aninsidebullet (bug 1049). - Add padding if the very first node in an
LIis anotherULorOL(bug 98636). - Obsolete since Gecko 50 List bullets do not inherit the font size of the list (bug 97351). Removed in Firefox 50bug 648331.
- Don't inhertit
fontproperties into tables except forfont-family. - Make
TABLEborders gray rather than using the foreground color. - Collapse top margin of
BODYandTDand bottom margin ofTD. - Collapse the bottom or top margins of empty elements (bug 97361).
- Support
<PRE wrap>,<PRE cols>,<PRE width>. - Orphaned
DDhas generated content:beforeinstead ofmargin(bug 5119). - Indent nested
DLelements (bug 8749). MAPacts like aninline, not ablock.- Give floated
IMGa 3pxmargin(bug 58899). - Residual style tags' size info does not take precedence over heading tags' size (bug 77352).
- Use
box-sizing:border-boxfor mostINPUTtypes andTEXTAREA. - Give
FORMamargin-bottom:1em(bug 41806).
- Orphaned
- In quirks mode CSS
classandidnames are case insensitive. In standards mode they are case sensitive. (This also applies togetElementsByClassName.) - 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
#, except in shorthands. - The CSS parser interprets unitless numbers as
px(except forline-heightand any other properties where they have distinct meaning, and except in shorthands). - In quirks mode, the CSS parser allows {} around the contents of style attributes (bug 99554). This behavior is being removed in Firefox 27, for interoperability. (bug 915053)
- An empty string for the
backgroundattribute sets the background URL to empty only in quirks mode. - The
topmargin,bottommargin,leftmargin, andrightmarginattributes onBODYare supported only in quirks mode (bug 9258).
Obsolete since Gecko 35 (Firefox 35.0 / Thunderbird 35.0 / SeaMonkey 2.32) (bug 95530) This quirk is now HTML5 conform and has been adopted in standards mode. - The
scrollLeft,scrollTop,scrollWidth, andscrollHeightproperties are relative toBODYin quirks mode (instead ofHTML) (bug 211030). - HTML (1-7) and CSS (
xx-small-xx-large) font sizes are calculated slightly differently (see bug 18136). - The
:hoverand:activepseudo-classes will only be applied to links, and only if there is no other pseudo-class in the selector. To match other elements, the selector must include a tag name, id, class or attribute.
Prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), there was no class check, so the:hoverpseudoclass was not applied to class selectors; for example,.someclass:hoverdid not work.
Prior to Gecko 36, it also applied to images, and form controls but the quirk has been adapted to match the behavior of other browser (bug 783213).
Prior to Gecko 36, the quirk was also applied if another pseudo-class was used in the same selector, if a pseudo-element was used in the selector, or if it was part of a pseudo-class argument (bug 783213). - Quirks mode has
document.allsupport (undetected). - Images (
IMGelements) withoutaltattributes sometimes display placeholder icons in quirks mode. - Obsolete since Gecko 2.0 HTML colors were parsed differently up to Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) (bug 121738).
- In quirks mode, the URL fragment
#topscrolls to the top of the page when there is no such anchor.
Obsolete since Gecko 10.0 However, HTML5 requires this behavior, and starting in Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), this also works in standards mode (bug 80784, bug 93077).
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). See almost standards mode for more details. - 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).
- In quirks mode, the
FONTelement changes the color of text decorations specified on ancestor elements.
Proposed to apply in all modes: bug 747517. - In quirks mode,
text-decorationis propagated into floating and absolutely positioned elements. - (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In quirks mode,
text-decorationis not propagated into tables (bug 572713). - maybe (Firefox 3) When computing the minimum intrinsic width of an inline flow directly in a table cell (no blocks in between), it is assumed that it is not possible to break before and after an image (when otherwise it would be).
- Obsolete since Gecko 8.0 Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)
text-decorationin quirks mode had line thickness and position adjusted on descendant text to match the descendant.
Tables
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). [This may have been an accurate description when written in June 2001, but no longer appears accurate. Should look into TableQuirkColorRule, re-describe, and figure out when it changed.]- Obsolete since Gecko 37 The
empty-cellsproperty defaulted tohidein quirks mode butshow(according to CSS2.1) in standards mode (see bug 33244) (though the correct fix would be to specify it on the HTMLTABLEelement inquirk.css). This quirk has been removed in Firefox 37 andempty-cellsalso defaults toshowin quirks mode (bug 1020400). - 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). To correspond, their width is computed as though only the remaining available space is the containing block width (bug 99461).
- In quirks mode
colspan="0"androwspan="0"are intentionally not handled as described in HTML4 (bug 9879). hspaceandvspaceare supported onTABLEonly in quirks mode (bug 41893).
Proposed to remove: bug 725646.- 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. [This may have been an accurate description when written in June 2001, but it no longer appears correct. I don't follow the code in nsCSSRenderingBorders well enough to tell, though.] - 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 (bug 277232). - In quirks mode, tables with no rows/rowgroups have zero height even when a height is specified (bug 241161).
- Something about the overhanging border (i.e., the half of the border that's outside the border-box) in border-collapse tables differs between quirks mode and standards mode. [See nsTableFrame::GetDeflationForBackground and figure out what really differs, and when it started differing.]
- Gecko had bug 248239, where table cells acted as they had
box-sizing:border-boxapplied for the purpose of theheightproperty. This is fixed in Gecko 16 (Firefox 16) for standards mode but remains in quirks mode for compatibility with quirks mode behavior of other browsers. - (Firefox 16 / Thunderbird 16 / SeaMonkey 2.13) Since this version bug 338554 is fixed and
(-moz-)box-sizingapplies to table cells in standards mode, but quirks mode keeps the old behavior. - Obsolete since Gecko 1.9 (Firefox 3) In quirks mode table cells with a border have a minimum width of one pixel.
- Obsolete since Gecko 1.9 (Firefox 3) The basic table layout strategy ignores padding (on what) in quirks mode.
- Obsolete since Gecko 1.9 (Firefox 3) The basic table layout strategy handles widths differently in some way.
- Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) 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).
Removed in bug 559834 and bug 573322, thoughmiddleandabsmiddlein table cells work in all modes now. - In quirks mode, percentage values are supported on the
cellspacingattribute, but treated as pixels (bug 106336).
Obsolete since Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) This quirk has been adopted in standards mode now.
Frames
- In quirks mode
marginwidthandmarginheighton aFRAMEare propagated to the containedBODY. - In a
FRAMESETcols/rowsspecification0*is treated as1*(see bug 40383). - Obsolete The
scrollingattribute onFRAMEis handled differently.
HTML Parser
- In quirks mode, we parsed HTML comments in a non-SGML way compatible with other browsers instead of treating "--" as the comment start and end delimiter.
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This quirk is now HTML5 conform and has been adopted in standards mode.
Original Document Information
- Author(s): David Baron, Boris Zbarsky
See also
Document Tags and Contributors
Tags:
Contributors to this page:
TimothyGu,
teoli,
Mathiasdm,
Brettz9,
muhasinbabu007,
Dholbert,
juergen jeka,
Jürgen Jeka,
Sheppy,
Bzbarsky,
DBaron,
Ms2ger,
Jesse,
Taken,
Mgjbot,
BenoitL,
Editmonkey,
Dria,
NickolayBot,
Tomekx,
Gbyxwc,
Ichthy,
Mcaruso
Last updated by:
TimothyGu,