Bug 1730256 [wpt PR 30555] - Move getWindowSegments to visualViewport.segments, a...
[gecko.git] / layout / style / res / quirk.css
blob6e74839ee33130eaeab040acdba879d784037d7d
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 */
11 li {
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;
39 table {
40 text-align: start;
41 white-space: normal; /* compatible with IE & spec */
42 line-height: normal;
44 /* Quirk: cut off all font inheritance in tables except for family. */
45 font-size: initial;
46 font-weight: initial;
47 font-style: initial;
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
60 * efficient.
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 {
67 margin-block-end: 0;
70 /* Similar as above, but for empty elements
71 * collapse the bottom or top margins of empty elements
72 * - see bug 97361
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 {
75 margin-block-end: 0;
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) */
83 img[align=left] {
84 margin-right: 3px;
87 img[align=right] {
88 margin-left: 3px;
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) */
103 form {
104 margin-block-end: 1em;