1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 @namespace url
(http://www
.w3
.org
/1999/xhtml
); /* set default namespace to HTML */
8 /* Quirk: make orphaned LIs have inside bullet (b=1049) */
10 /* force inside position for orphaned lis */
12 list-style-position: inside
;
15 /* restore outside position for lists inside LIs */
16 li :is
(ul
, ol
, dir
, menu
) {
17 list-style-position: outside
;
20 /* undo previous two rules for properly nested lists */
21 :is
(ul
, ol
, dir
, menu
) :is
(ul
, ol
, dir
, menu
, li
) {
22 list-style-position: unset
;
26 /* Quirk: ensure that we get proper padding if the very first
27 * node in an LI is another UL or OL. This is an ugly way to
28 * fix the problem, because it extends the LI up into what
29 * would otherwise appear to be the ULs space. (b=38832) */
31 /* Note: this fix will fail once we implement marker box
32 * alignment correctly. */
33 li
> ul:-moz-first-node
,
34 li
> ol:-moz-first-node
{
35 padding-block-start: 1em;
41 white-space: normal
; /* compatible with IE & spec */
44 /* Quirk: cut off all font inheritance in tables except for family. */
48 font-variant: initial
;
52 /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
55 * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
56 * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
57 * check on every single element in the document. If we list all the
58 * element names for which the UA stylesheet specifies a margin, the
59 * selectors will be hashed in the selector maps and things will be much more
62 :is
(body
, td
, th
) > :is
(p
, dl
, multicol
, blockquote
, h1
, h2
, h3
, h4
, h5
, h6
, listing
, plaintext
, xmp
, pre
, ul
, menu
, dir
, ol
):-moz-first-node
{
63 margin-block-start: 0;
66 td
> p:-moz-last-node
, th
> p:-moz-last-node
{
70 /* Similar as above, but for empty elements
71 * collapse the bottom or top margins of empty elements
74 :is
(body
, td
, th
) > :is
(p
, dl
, multicol
, blockquote
, h1
, h2
, h3
, h4
, h5
, h6
, listing
, plaintext
, xmp
, pre
, ul
, menu
, dir
, ol
):-moz-only-whitespace:-moz-first-node
{
78 :is
(td
, th
) > :is
(p
, dl
, multicol
, blockquote
, h1
, h2
, h3
, h4
, h5
, h6
, listing
, plaintext
, xmp
, pre
, ul
, menu
, dir
, ol
):-moz-only-whitespace:-moz-last-node
{
79 margin-block-start: 0;
82 /* Quirk: Make floated images have a margin (b=58899) */
92 * Quirk: Use border-box box sizing for text inputs, password inputs, and
93 * textareas. (b=184478 on why we use content-box sizing in standards mode)
96 /* Note that all other <input>s already use border-box
97 sizing, so we're ok with this selector */
98 input:not
([type
=image
]), textarea
{
99 box-sizing: border-box
;
102 /* Quirk: give form margin for compat (b=41806) */
104 margin-block-end: 1em;