michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ michael@0: michael@0: michael@0: /* Quirk: make orphaned LIs have inside bullet (b=1049) */ michael@0: michael@0: /* force inside position for orphaned lis */ michael@0: li { michael@0: list-style-position: inside; michael@0: } michael@0: michael@0: /* restore outside position for lists inside LIs */ michael@0: li ul, li ol, li dir, li menu { michael@0: list-style-position: outside; michael@0: } michael@0: michael@0: /* undo previous two rules for properly nested lists */ michael@0: ul ul, ul ol, ul dir, ul menu, ul li, michael@0: ol ul, ol ol, ol dir, ol menu, ol li, michael@0: dir ul, dir ol, dir dir, dir menu, dir li, michael@0: menu ul, menu ol, menu dir, menu menu, menu li { michael@0: list-style-position: inherit; michael@0: } michael@0: michael@0: michael@0: /* Quirk: ensure that we get proper padding if the very first michael@0: * node in an LI is another UL or OL. This is an ugly way to michael@0: * fix the problem, because it extends the LI up into what michael@0: * would otherwise appear to be the ULs space. (b=38832) */ michael@0: michael@0: /* Note: this fix will fail once we implement marker box michael@0: * alignment correctly. */ michael@0: li > ul:-moz-first-node, michael@0: li > ol:-moz-first-node { michael@0: padding-top: 1em; michael@0: } michael@0: michael@0: michael@0: /* Quirk: prevent bullet from resizing with the list item michael@0: * see bug 97351 michael@0: */ michael@0: michael@0: li::-moz-list-bullet { michael@0: font-size: initial; michael@0: } michael@0: michael@0: michael@0: table { michael@0: text-align: start; michael@0: white-space: normal; /* compatible with IE & spec */ michael@0: line-height: normal; michael@0: michael@0: /* Quirk: cut off all font inheritance in tables except for family. */ michael@0: font-size: initial; michael@0: font-weight: initial; michael@0: font-style: initial; michael@0: font-variant: initial; michael@0: } michael@0: michael@0: /* michael@0: * Make table borders gray for compatibility with what other browsers do michael@0: * in all modes, rather than using the foreground color. michael@0: */ michael@0: table, td, th, tr, thead, tbody, tfoot, colgroup, col { michael@0: border-color: gray; michael@0: } michael@0: michael@0: michael@0: /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */ michael@0: michael@0: /* michael@0: * While it may seem simpler to use :-moz-first-node and :-moz-last-node without michael@0: * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node michael@0: * check on every single element in the document. If we list all the michael@0: * element names for which the UA stylesheet specifies a margin, the michael@0: * selectors will be hashed in the RuleHash and things will be much more michael@0: * efficient. michael@0: */ michael@0: body > p:-moz-first-node, td > p:-moz-first-node, th > p:-moz-first-node, michael@0: body > dl:-moz-first-node, td > dl:-moz-first-node, th > dl:-moz-first-node, michael@0: body > multicol:-moz-first-node, td > multicol:-moz-first-node, th > multicol:-moz-first-node, michael@0: body > blockquote:-moz-first-node, td > blockquote:-moz-first-node, th > blockquote:-moz-first-node, michael@0: body > h1:-moz-first-node, td > h1:-moz-first-node, th > h1:-moz-first-node, michael@0: body > h2:-moz-first-node, td > h2:-moz-first-node, th > h2:-moz-first-node, michael@0: body > h3:-moz-first-node, td > h3:-moz-first-node, th > h3:-moz-first-node, michael@0: body > h4:-moz-first-node, td > h4:-moz-first-node, th > h4:-moz-first-node, michael@0: body > h5:-moz-first-node, td > h5:-moz-first-node, th > h5:-moz-first-node, michael@0: body > h6:-moz-first-node, td > h6:-moz-first-node, th > h6:-moz-first-node, michael@0: body > listing:-moz-first-node, td > listing:-moz-first-node, th > listing:-moz-first-node, michael@0: body > plaintext:-moz-first-node, td > plaintext:-moz-first-node, th > plaintext:-moz-first-node, michael@0: body > xmp:-moz-first-node, td > xmp:-moz-first-node, th > xmp:-moz-first-node, michael@0: body > pre:-moz-first-node, td > pre:-moz-first-node, th > pre:-moz-first-node, michael@0: body > ul:-moz-first-node, td > ul:-moz-first-node, th > ul:-moz-first-node, michael@0: body > menu:-moz-first-node, td > menu:-moz-first-node, th > menu:-moz-first-node, michael@0: body > dir:-moz-first-node, td > dir:-moz-first-node, th > dir:-moz-first-node, michael@0: body > ol:-moz-first-node, td > ol:-moz-first-node, th > ol:-moz-first-node { michael@0: margin-top: 0; michael@0: } michael@0: michael@0: td > p:-moz-last-node, th > p:-moz-last-node { michael@0: margin-bottom: 0; michael@0: } michael@0: michael@0: /* Similar as above, but for empty elements michael@0: * collapse the bottom or top margins of empty elements michael@0: * - see bug 97361 michael@0: */ michael@0: body > p:-moz-only-whitespace:-moz-first-node, michael@0: td > p:-moz-only-whitespace:-moz-first-node, th > p:-moz-only-whitespace:-moz-first-node, michael@0: body > dl:-moz-only-whitespace:-moz-first-node, td > dl:-moz-only-whitespace:-moz-first-node, michael@0: th > dl:-moz-only-whitespace:-moz-first-node, body > multicol:-moz-only-whitespace:-moz-first-node, michael@0: td > multicol:-moz-only-whitespace:-moz-first-node, th > multicol:-moz-only-whitespace:-moz-first-node, michael@0: body > blockquote:-moz-only-whitespace:-moz-first-node, td > blockquote:-moz-only-whitespace:-moz-first-node, michael@0: th > blockquote:-moz-only-whitespace:-moz-first-node, body > h1:-moz-only-whitespace:-moz-first-node, michael@0: td > h1:-moz-only-whitespace:-moz-first-node, th > h1:-moz-only-whitespace:-moz-first-node, michael@0: body > h2:-moz-only-whitespace:-moz-first-node, td > h2:-moz-only-whitespace:-moz-first-node, michael@0: th > h2:-moz-only-whitespace:-moz-first-node, body > h3:-moz-only-whitespace:-moz-first-node, michael@0: td > h3:-moz-only-whitespace:-moz-first-node, th > h3:-moz-only-whitespace:-moz-first-node, michael@0: body > h4:-moz-only-whitespace:-moz-first-node, td > h4:-moz-only-whitespace:-moz-first-node, michael@0: th > h4:-moz-only-whitespace:-moz-first-node, body > h5:-moz-only-whitespace:-moz-first-node, michael@0: td > h5:-moz-only-whitespace:-moz-first-node, th > h5:-moz-only-whitespace:-moz-first-node, michael@0: body > h6:-moz-only-whitespace:-moz-first-node, td > h6:-moz-only-whitespace:-moz-first-node, michael@0: th > h6:-moz-only-whitespace:-moz-first-node, body > listing:-moz-only-whitespace:-moz-first-node, michael@0: td > listing:-moz-only-whitespace:-moz-first-node, th > listing:-moz-only-whitespace:-moz-first-node, michael@0: body > plaintext:-moz-only-whitespace:-moz-first-node, td > plaintext:-moz-only-whitespace:-moz-first-node, michael@0: th > plaintext:-moz-only-whitespace:-moz-first-node, body > xmp:-moz-only-whitespace:-moz-first-node, michael@0: td > xmp:-moz-only-whitespace:-moz-first-node, th > xmp:-moz-only-whitespace:-moz-first-node, michael@0: body > pre:-moz-only-whitespace:-moz-first-node, td > pre:-moz-only-whitespace:-moz-first-node, michael@0: th > pre:-moz-only-whitespace:-moz-first-node, body > ul:-moz-only-whitespace:-moz-first-node, michael@0: td > ul:-moz-only-whitespace:-moz-first-node, th > ul:-moz-only-whitespace:-moz-first-node, michael@0: body > menu:-moz-only-whitespace:-moz-first-node, td > menu:-moz-only-whitespace:-moz-first-node, michael@0: th > menu:-moz-only-whitespace:-moz-first-node, body > dir:-moz-only-whitespace:-moz-first-node, michael@0: td > dir:-moz-only-whitespace:-moz-first-node, th > dir:-moz-only-whitespace:-moz-first-node, michael@0: body > ol:-moz-only-whitespace:-moz-first-node, td > ol:-moz-only-whitespace:-moz-first-node, michael@0: th > ol:-moz-only-whitespace:-moz-first-node { michael@0: margin-bottom: 0; michael@0: } michael@0: michael@0: td > p:-moz-only-whitespace:-moz-last-node, th > p:-moz-only-whitespace:-moz-last-node, michael@0: td > dl:-moz-only-whitespace:-moz-last-node, th > dl:-moz-only-whitespace:-moz-last-node, michael@0: td > multicol:-moz-only-whitespace:-moz-last-node, th > multicol:-moz-only-whitespace:-moz-last-node, michael@0: td > blockquote:-moz-only-whitespace:-moz-last-node, th > blockquote:-moz-only-whitespace:-moz-last-node, michael@0: td > h1:-moz-only-whitespace:-moz-last-node, th > h1:-moz-only-whitespace:-moz-last-node, michael@0: td > h2:-moz-only-whitespace:-moz-last-node, th > h2:-moz-only-whitespace:-moz-last-node, michael@0: td > h3:-moz-only-whitespace:-moz-last-node, th > h3:-moz-only-whitespace:-moz-last-node, michael@0: td > h4:-moz-only-whitespace:-moz-last-node, th > h4:-moz-only-whitespace:-moz-last-node, michael@0: td > h5:-moz-only-whitespace:-moz-last-node, th > h5:-moz-only-whitespace:-moz-last-node, michael@0: td > h6:-moz-only-whitespace:-moz-last-node, th > h6:-moz-only-whitespace:-moz-last-node, michael@0: td > listing:-moz-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node, michael@0: td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node, michael@0: td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node, michael@0: td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node, michael@0: td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node, michael@0: td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node, michael@0: td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node, michael@0: td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node { michael@0: margin-top: 0; michael@0: } michael@0: michael@0: michael@0: /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */ michael@0: michael@0: :not(dl) > dd { michael@0: display: inline; michael@0: margin: 0; michael@0: } michael@0: michael@0: :not(dl) > dd:before { michael@0: display: inline; michael@0: white-space: pre; michael@0: font-size: 1px; michael@0: line-height: 0; michael@0: content: "\A "; michael@0: -moz-margin-end: 40px; michael@0: } michael@0: michael@0: michael@0: /* quirk to indent nested DL elements (b=8749) */ michael@0: michael@0: dl > dl { michael@0: display: block; michael@0: -moz-margin-start: 40px; michael@0: } michael@0: michael@0: michael@0: /* Quirk: Make floated images have a margin (b=58899) */ michael@0: michael@0: img[align=left] { michael@0: margin-right: 3px; michael@0: } michael@0: michael@0: img[align=right] { michael@0: margin-left: 3px; michael@0: } michael@0: michael@0: /* michael@0: * Quirk: Use border-box box sizing for text inputs, password inputs, and michael@0: * textareas. (b=184478 on why we use content-box sizing in standards mode) michael@0: */ michael@0: michael@0: /* Note that all other s already use border-box michael@0: sizing, so we're ok with this selector */ michael@0: input:not([type=image]), textarea { michael@0: box-sizing: border-box; michael@0: } michael@0: michael@0: /* Quirk: give form margin for compat (b=41806) */ michael@0: form { michael@0: margin-bottom: 1em; michael@0: }