Revision 50227 of Mozilla Quirks Mode Behavior

  • Revision slug: Mozilla_Quirks_Mode_Behavior
  • Revision title: Mozilla Quirks Mode Behavior
  • Revision id: 50227
  • Created:
  • Creator: Mcaruso
  • Is current revision? No
  • Comment Added markup

Revision Content

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

  • Miscellaneous & Style
    • All of the style rules in quirk.css apply.
    • Stylesheets linked in the document with an advisory mime type of text/css will still be treated as CSS even if the server gives a Content-Type header other than text/css.
    • The CSS parser accepts colors not beginning with #.
    • The CSS parser interprets unitless numbers as px (except for font-size because that was what Nav4 did, and except for line-height and any other properties where they have distinct meaning).
    • HTML colors are parsed differently (# is not required, and missing digits are filled int differently)
    • An empty string for the background attribute 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 :hover pseudoclass will only be applied to links, images, and form controls, unless the selector includes tag names, ids, or attributes.
  • Block and Inline layout
    • {{mediawiki.external('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 Nav4), even though CSS says that percentage heights should behave like 'auto' heights when the parent element doesn't have a fixed height. See a description. See also bug 41656 and its duplicates. Some of these quirks may cause other effects (see bug 54119).
    • The HR element is treated differently in quirks and strict mode (and arguably wrong in both).
  • Tables
    • Table background colors work differently (see bug 4510) It is not clear that this quirk is needed.
    • In quirks mode absmiddle (handled incorrectly?) and middle (perhaps incorrectly as well?) are accepted as values of align on table cells, and absmiddle, abscenter, and middle are supported on tables (treated the same as center).
    • TD, TH, TR, THEAD, TBODY, and TFOOT elements have the document background (and color?) applied to them (when the document background is specified in certain ways?) (see also bug 70831 ).
    • The empty-cells property defaults to hide in 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 HTML TABLE element in quirk.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" and rowspan="0" are intentionally not handled as described in HTML4.
    • hspace and vspace are supported on TABLE only in quirks mode.
    • In quirks mode, when tables have a border style of inset or outset, 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.
    • The basic table layout strategy ignores padding (on what) in quirks mode.
    • The basic table layout strategy handles widths differently in some way.
  • Forms
    • Button inputs calculate their size differently.
    • In standard mode a BUTTON element (?) can submit only if it lacks a type attribute.
    • Text inputs (and other form controls containing text???) calculate their size differently (see bug X for the description of the original fix and also bug X for suggested modifications)
    • The fonts for button INPUT elements and SELECT elements 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.
  • Frames
    • In quirks mode marginwidth and marginheight on a FRAME are propagated to the contained BODY.
    • In a frame size specification 0* is treated as 1* (see bug 40383).
    • The scrolling attribute on FRAME is handled differently.
  • 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

Revision Source

<p>The following is a <i>rough</i> list of the differences that exist between Mozilla's standards mode and quirks mode behavior. This list is current as of early June 2001. 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 <code>text/css</code>.
</p>
<ul><li> Miscellaneous &amp; Style
<ul><li> All of the style rules in <a class="external" href="http://lxr.mozilla.org/seamonkey/source/layout/style/quirk.css">quirk.css</a> apply.
</li><li> Stylesheets linked in the document with an advisory mime type of <code>text/css</code> will still be treated as CSS even if the server gives a <code>Content-Type</code> header other than <code>text/css</code>.
</li><li> The CSS parser accepts colors not beginning with #.
</li><li> The CSS parser interprets unitless numbers as <code>px</code> (except for <code>font-size</code> because that was what Nav4 did, and except for <code>line-height</code> and any other properties where they have distinct meaning).
</li><li> HTML colors are parsed differently (# is not required, and missing digits are filled int differently)
</li><li> An empty string for the <code>background</code> attribute sets the background URL to empty only in quirks mode.
</li><li> System fonts work differently in navquirks mode (shouldn't the form controls that use them be the ones working differently instead?).
</li><li> HTML (1-7) and CSS (<code>xx-small</code> - <code>xx-large</code>) font sizes are calculated slightly differently (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=18136">bug 18136</a>).
</li><li> List bullets do not inherit the font size of the list in quirks mode.
</li><li> The <code>:hover</code> pseudoclass will only be applied to links, images, and form controls, unless the selector includes tag names, ids, or attributes.
</li></ul>
</li></ul>
<ul><li> Block and Inline layout
<ul><li> <b>{{mediawiki.external('This quirk is present in almost standards mode.')}}</b> Line height (not <code>line-height</code>) calculations are different to fix <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=5821">bug 5821</a> and <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=24186">bug 24186</a> (some other issues are described in <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=22274">bug 22274</a>).
</li><li> There are a bunch of quirks to get percentage heights on images, tables, objects, and applets (etc.?) to "work" (the way they did in Nav4), even though CSS says that percentage heights should behave like 'auto' heights when the parent element doesn't have a fixed height. See <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=33443#c9">a description</a>. See also <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=41656">bug 41656</a> and its duplicates. Some of these quirks may cause other effects (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=54119">bug 54119</a>).
</li><li> The <code>HR</code> element is treated differently in quirks and strict mode (and arguably wrong in both).
</li></ul>
</li></ul>
<ul><li> Tables
<ul><li> Table background colors work differently (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=4510">bug 4510</a>) It is not clear that this quirk is needed.
</li><li> In quirks mode <code>absmiddle</code> (handled incorrectly?) and <code>middle</code> (perhaps incorrectly as well?) are accepted as values of <code>align</code> on table cells, and <code>absmiddle</code>, <code>abscenter</code>, and <code>middle</code> are supported on tables (treated the same as <code>center</code>).
</li><li> <code>TD</code>, <code>TH</code>, <code>TR</code>, <code>THEAD</code>, <code>TBODY</code>, and <code>TFOOT</code> elements have the document background (and color?) applied to them (when the document background is specified in certain ways?) (see also <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=70831">bug 70831</a> ).
</li><li> The <code>empty-cells</code> property defaults to <code>hide</code> in quirks mode but show (according to CSS2 errata) in strict mode (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=33244">bug 33244</a>) (though the correct fix would be to specify it on the HTML <code>TABLE</code> element in <code>quirk.css</code>).
</li><li> 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 <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=43086">bug 43086</a>).
</li><li> In quirks mode <code>colspan="0"</code> and <code>rowspan="0"</code> are intentionally not handled as described in HTML4.
</li><li> <code>hspace</code> and <code>vspace</code> are supported on <code>TABLE</code> only in quirks mode.
</li><li> In quirks mode, when tables have a border style of <code>inset</code> or <code>outset</code>, the border color is based on the background color of the table or of the nearest ancestor with non-transparent background.
</li><li> In quirks mode table cells with a border have a minimum width of one pixel.
</li><li> The basic table layout strategy ignores padding (on what) in quirks mode.
</li><li> The basic table layout strategy handles widths differently in some way.
</li></ul>
</li></ul>
<ul><li> Forms
<ul><li> Button inputs calculate their size differently.
</li><li> In standard mode a <code>BUTTON</code> element (?) can submit only if it lacks a <code>type</code> attribute.
</li><li> Text inputs (and other form controls containing text???) calculate their size differently (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=X">bug X</a> for the description of the original fix and also <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=X">bug X</a> for suggested modifications)
</li><li> The fonts for button <code>INPUT</code> elements and <code>SELECT</code> elements are computed differently.
</li><li> The requirement of HTML that one button in a radio group is always selected (by default) is not enforced in quirks mode.
</li></ul>
</li></ul>
<ul><li> Frames
<ul><li> In quirks mode <code>marginwidth</code> and <code>marginheight</code> on a <code>FRAME</code> are propagated to the contained <code>BODY</code>.
</li><li> In a frame size specification <code>0*</code> is treated as <code>1*</code> (see <a class="external" href="http://bugzilla.mozilla.org/show_bug.cgi?id=40383">bug 40383</a>).
</li><li> The <code>scrolling</code> attribute on <code>FRAME</code> is handled differently.
</li></ul>
</li></ul>
<ul><li> HTML Parser
<ul><li> In quirks mode, we parse HTML comments in a way compatible with older browsers instead of treating "--" as the comment start and end delimeter
</li></ul>
</li></ul>
Revert to this revision