layout/style/quirk.css

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
michael@0 6
michael@0 7
michael@0 8 /* Quirk: make orphaned LIs have inside bullet (b=1049) */
michael@0 9
michael@0 10 /* force inside position for orphaned lis */
michael@0 11 li {
michael@0 12 list-style-position: inside;
michael@0 13 }
michael@0 14
michael@0 15 /* restore outside position for lists inside LIs */
michael@0 16 li ul, li ol, li dir, li menu {
michael@0 17 list-style-position: outside;
michael@0 18 }
michael@0 19
michael@0 20 /* undo previous two rules for properly nested lists */
michael@0 21 ul ul, ul ol, ul dir, ul menu, ul li,
michael@0 22 ol ul, ol ol, ol dir, ol menu, ol li,
michael@0 23 dir ul, dir ol, dir dir, dir menu, dir li,
michael@0 24 menu ul, menu ol, menu dir, menu menu, menu li {
michael@0 25 list-style-position: inherit;
michael@0 26 }
michael@0 27
michael@0 28
michael@0 29 /* Quirk: ensure that we get proper padding if the very first
michael@0 30 * node in an LI is another UL or OL. This is an ugly way to
michael@0 31 * fix the problem, because it extends the LI up into what
michael@0 32 * would otherwise appear to be the ULs space. (b=38832) */
michael@0 33
michael@0 34 /* Note: this fix will fail once we implement marker box
michael@0 35 * alignment correctly. */
michael@0 36 li > ul:-moz-first-node,
michael@0 37 li > ol:-moz-first-node {
michael@0 38 padding-top: 1em;
michael@0 39 }
michael@0 40
michael@0 41
michael@0 42 /* Quirk: prevent bullet from resizing with the list item
michael@0 43 * see bug 97351
michael@0 44 */
michael@0 45
michael@0 46 li::-moz-list-bullet {
michael@0 47 font-size: initial;
michael@0 48 }
michael@0 49
michael@0 50
michael@0 51 table {
michael@0 52 text-align: start;
michael@0 53 white-space: normal; /* compatible with IE & spec */
michael@0 54 line-height: normal;
michael@0 55
michael@0 56 /* Quirk: cut off all font inheritance in tables except for family. */
michael@0 57 font-size: initial;
michael@0 58 font-weight: initial;
michael@0 59 font-style: initial;
michael@0 60 font-variant: initial;
michael@0 61 }
michael@0 62
michael@0 63 /*
michael@0 64 * Make table borders gray for compatibility with what other browsers do
michael@0 65 * in all modes, rather than using the foreground color.
michael@0 66 */
michael@0 67 table, td, th, tr, thead, tbody, tfoot, colgroup, col {
michael@0 68 border-color: gray;
michael@0 69 }
michael@0 70
michael@0 71
michael@0 72 /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
michael@0 73
michael@0 74 /*
michael@0 75 * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
michael@0 76 * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
michael@0 77 * check on every single element in the document. If we list all the
michael@0 78 * element names for which the UA stylesheet specifies a margin, the
michael@0 79 * selectors will be hashed in the RuleHash and things will be much more
michael@0 80 * efficient.
michael@0 81 */
michael@0 82 body > p:-moz-first-node, td > p:-moz-first-node, th > p:-moz-first-node,
michael@0 83 body > dl:-moz-first-node, td > dl:-moz-first-node, th > dl:-moz-first-node,
michael@0 84 body > multicol:-moz-first-node, td > multicol:-moz-first-node, th > multicol:-moz-first-node,
michael@0 85 body > blockquote:-moz-first-node, td > blockquote:-moz-first-node, th > blockquote:-moz-first-node,
michael@0 86 body > h1:-moz-first-node, td > h1:-moz-first-node, th > h1:-moz-first-node,
michael@0 87 body > h2:-moz-first-node, td > h2:-moz-first-node, th > h2:-moz-first-node,
michael@0 88 body > h3:-moz-first-node, td > h3:-moz-first-node, th > h3:-moz-first-node,
michael@0 89 body > h4:-moz-first-node, td > h4:-moz-first-node, th > h4:-moz-first-node,
michael@0 90 body > h5:-moz-first-node, td > h5:-moz-first-node, th > h5:-moz-first-node,
michael@0 91 body > h6:-moz-first-node, td > h6:-moz-first-node, th > h6:-moz-first-node,
michael@0 92 body > listing:-moz-first-node, td > listing:-moz-first-node, th > listing:-moz-first-node,
michael@0 93 body > plaintext:-moz-first-node, td > plaintext:-moz-first-node, th > plaintext:-moz-first-node,
michael@0 94 body > xmp:-moz-first-node, td > xmp:-moz-first-node, th > xmp:-moz-first-node,
michael@0 95 body > pre:-moz-first-node, td > pre:-moz-first-node, th > pre:-moz-first-node,
michael@0 96 body > ul:-moz-first-node, td > ul:-moz-first-node, th > ul:-moz-first-node,
michael@0 97 body > menu:-moz-first-node, td > menu:-moz-first-node, th > menu:-moz-first-node,
michael@0 98 body > dir:-moz-first-node, td > dir:-moz-first-node, th > dir:-moz-first-node,
michael@0 99 body > ol:-moz-first-node, td > ol:-moz-first-node, th > ol:-moz-first-node {
michael@0 100 margin-top: 0;
michael@0 101 }
michael@0 102
michael@0 103 td > p:-moz-last-node, th > p:-moz-last-node {
michael@0 104 margin-bottom: 0;
michael@0 105 }
michael@0 106
michael@0 107 /* Similar as above, but for empty elements
michael@0 108 * collapse the bottom or top margins of empty elements
michael@0 109 * - see bug 97361
michael@0 110 */
michael@0 111 body > p:-moz-only-whitespace:-moz-first-node,
michael@0 112 td > p:-moz-only-whitespace:-moz-first-node, th > p:-moz-only-whitespace:-moz-first-node,
michael@0 113 body > dl:-moz-only-whitespace:-moz-first-node, td > dl:-moz-only-whitespace:-moz-first-node,
michael@0 114 th > dl:-moz-only-whitespace:-moz-first-node, body > multicol:-moz-only-whitespace:-moz-first-node,
michael@0 115 td > multicol:-moz-only-whitespace:-moz-first-node, th > multicol:-moz-only-whitespace:-moz-first-node,
michael@0 116 body > blockquote:-moz-only-whitespace:-moz-first-node, td > blockquote:-moz-only-whitespace:-moz-first-node,
michael@0 117 th > blockquote:-moz-only-whitespace:-moz-first-node, body > h1:-moz-only-whitespace:-moz-first-node,
michael@0 118 td > h1:-moz-only-whitespace:-moz-first-node, th > h1:-moz-only-whitespace:-moz-first-node,
michael@0 119 body > h2:-moz-only-whitespace:-moz-first-node, td > h2:-moz-only-whitespace:-moz-first-node,
michael@0 120 th > h2:-moz-only-whitespace:-moz-first-node, body > h3:-moz-only-whitespace:-moz-first-node,
michael@0 121 td > h3:-moz-only-whitespace:-moz-first-node, th > h3:-moz-only-whitespace:-moz-first-node,
michael@0 122 body > h4:-moz-only-whitespace:-moz-first-node, td > h4:-moz-only-whitespace:-moz-first-node,
michael@0 123 th > h4:-moz-only-whitespace:-moz-first-node, body > h5:-moz-only-whitespace:-moz-first-node,
michael@0 124 td > h5:-moz-only-whitespace:-moz-first-node, th > h5:-moz-only-whitespace:-moz-first-node,
michael@0 125 body > h6:-moz-only-whitespace:-moz-first-node, td > h6:-moz-only-whitespace:-moz-first-node,
michael@0 126 th > h6:-moz-only-whitespace:-moz-first-node, body > listing:-moz-only-whitespace:-moz-first-node,
michael@0 127 td > listing:-moz-only-whitespace:-moz-first-node, th > listing:-moz-only-whitespace:-moz-first-node,
michael@0 128 body > plaintext:-moz-only-whitespace:-moz-first-node, td > plaintext:-moz-only-whitespace:-moz-first-node,
michael@0 129 th > plaintext:-moz-only-whitespace:-moz-first-node, body > xmp:-moz-only-whitespace:-moz-first-node,
michael@0 130 td > xmp:-moz-only-whitespace:-moz-first-node, th > xmp:-moz-only-whitespace:-moz-first-node,
michael@0 131 body > pre:-moz-only-whitespace:-moz-first-node, td > pre:-moz-only-whitespace:-moz-first-node,
michael@0 132 th > pre:-moz-only-whitespace:-moz-first-node, body > ul:-moz-only-whitespace:-moz-first-node,
michael@0 133 td > ul:-moz-only-whitespace:-moz-first-node, th > ul:-moz-only-whitespace:-moz-first-node,
michael@0 134 body > menu:-moz-only-whitespace:-moz-first-node, td > menu:-moz-only-whitespace:-moz-first-node,
michael@0 135 th > menu:-moz-only-whitespace:-moz-first-node, body > dir:-moz-only-whitespace:-moz-first-node,
michael@0 136 td > dir:-moz-only-whitespace:-moz-first-node, th > dir:-moz-only-whitespace:-moz-first-node,
michael@0 137 body > ol:-moz-only-whitespace:-moz-first-node, td > ol:-moz-only-whitespace:-moz-first-node,
michael@0 138 th > ol:-moz-only-whitespace:-moz-first-node {
michael@0 139 margin-bottom: 0;
michael@0 140 }
michael@0 141
michael@0 142 td > p:-moz-only-whitespace:-moz-last-node, th > p:-moz-only-whitespace:-moz-last-node,
michael@0 143 td > dl:-moz-only-whitespace:-moz-last-node, th > dl:-moz-only-whitespace:-moz-last-node,
michael@0 144 td > multicol:-moz-only-whitespace:-moz-last-node, th > multicol:-moz-only-whitespace:-moz-last-node,
michael@0 145 td > blockquote:-moz-only-whitespace:-moz-last-node, th > blockquote:-moz-only-whitespace:-moz-last-node,
michael@0 146 td > h1:-moz-only-whitespace:-moz-last-node, th > h1:-moz-only-whitespace:-moz-last-node,
michael@0 147 td > h2:-moz-only-whitespace:-moz-last-node, th > h2:-moz-only-whitespace:-moz-last-node,
michael@0 148 td > h3:-moz-only-whitespace:-moz-last-node, th > h3:-moz-only-whitespace:-moz-last-node,
michael@0 149 td > h4:-moz-only-whitespace:-moz-last-node, th > h4:-moz-only-whitespace:-moz-last-node,
michael@0 150 td > h5:-moz-only-whitespace:-moz-last-node, th > h5:-moz-only-whitespace:-moz-last-node,
michael@0 151 td > h6:-moz-only-whitespace:-moz-last-node, th > h6:-moz-only-whitespace:-moz-last-node,
michael@0 152 td > listing:-moz-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node,
michael@0 153 td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node,
michael@0 154 td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node,
michael@0 155 td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node,
michael@0 156 td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
michael@0 157 td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
michael@0 158 td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
michael@0 159 td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
michael@0 160 margin-top: 0;
michael@0 161 }
michael@0 162
michael@0 163
michael@0 164 /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
michael@0 165
michael@0 166 :not(dl) > dd {
michael@0 167 display: inline;
michael@0 168 margin: 0;
michael@0 169 }
michael@0 170
michael@0 171 :not(dl) > dd:before {
michael@0 172 display: inline;
michael@0 173 white-space: pre;
michael@0 174 font-size: 1px;
michael@0 175 line-height: 0;
michael@0 176 content: "\A ";
michael@0 177 -moz-margin-end: 40px;
michael@0 178 }
michael@0 179
michael@0 180
michael@0 181 /* quirk to indent nested DL elements (b=8749) */
michael@0 182
michael@0 183 dl > dl {
michael@0 184 display: block;
michael@0 185 -moz-margin-start: 40px;
michael@0 186 }
michael@0 187
michael@0 188
michael@0 189 /* Quirk: Make floated images have a margin (b=58899) */
michael@0 190
michael@0 191 img[align=left] {
michael@0 192 margin-right: 3px;
michael@0 193 }
michael@0 194
michael@0 195 img[align=right] {
michael@0 196 margin-left: 3px;
michael@0 197 }
michael@0 198
michael@0 199 /*
michael@0 200 * Quirk: Use border-box box sizing for text inputs, password inputs, and
michael@0 201 * textareas. (b=184478 on why we use content-box sizing in standards mode)
michael@0 202 */
michael@0 203
michael@0 204 /* Note that all other <input>s already use border-box
michael@0 205 sizing, so we're ok with this selector */
michael@0 206 input:not([type=image]), textarea {
michael@0 207 box-sizing: border-box;
michael@0 208 }
michael@0 209
michael@0 210 /* Quirk: give form margin for compat (b=41806) */
michael@0 211 form {
michael@0 212 margin-bottom: 1em;
michael@0 213 }

mercurial