layout/style/quirk.css

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/quirk.css	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,213 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
     1.9 +
    1.10 +
    1.11 +/* Quirk: make orphaned LIs have inside bullet (b=1049) */
    1.12 +
    1.13 +/* force inside position for orphaned lis */
    1.14 +li {
    1.15 +  list-style-position: inside;
    1.16 +}
    1.17 +
    1.18 +/* restore outside position for lists inside LIs */
    1.19 +li ul, li ol, li dir, li menu {
    1.20 +  list-style-position: outside;
    1.21 +}
    1.22 +
    1.23 +/* undo previous two rules for properly nested lists */
    1.24 +  ul ul,   ul ol,   ul dir,   ul menu,   ul li,
    1.25 +  ol ul,   ol ol,   ol dir,   ol menu,   ol li,
    1.26 + dir ul,  dir ol,  dir dir,  dir menu,  dir li,
    1.27 +menu ul, menu ol, menu dir, menu menu, menu li {
    1.28 +  list-style-position: inherit;
    1.29 +}
    1.30 +
    1.31 +
    1.32 +/* Quirk: ensure that we get proper padding if the very first
    1.33 + * node in an LI is another UL or OL. This is an ugly way to
    1.34 + * fix the problem, because it extends the LI up into what
    1.35 + * would otherwise appear to be the ULs space. (b=38832) */
    1.36 +
    1.37 +/* Note: this fix will fail once we implement marker box
    1.38 + * alignment correctly. */
    1.39 +li > ul:-moz-first-node,
    1.40 +li > ol:-moz-first-node {
    1.41 +  padding-top: 1em;
    1.42 +}
    1.43 +
    1.44 +
    1.45 +/* Quirk: prevent bullet from resizing with the list item
    1.46 + *   see bug 97351
    1.47 + */
    1.48 +
    1.49 +li::-moz-list-bullet {
    1.50 +  font-size: initial;
    1.51 +}
    1.52 +
    1.53 +
    1.54 +table {
    1.55 +  text-align: start;
    1.56 +  white-space: normal; /* compatible with IE & spec */
    1.57 +  line-height: normal;
    1.58 +
    1.59 +  /* Quirk: cut off all font inheritance in tables except for family. */
    1.60 +  font-size: initial;
    1.61 +  font-weight: initial;
    1.62 +  font-style: initial;
    1.63 +  font-variant: initial;
    1.64 +}
    1.65 +
    1.66 +/*
    1.67 + * Make table borders gray for compatibility with what other browsers do
    1.68 + * in all modes, rather than using the foreground color.
    1.69 + */
    1.70 +table, td, th, tr, thead, tbody, tfoot, colgroup, col {
    1.71 +  border-color: gray;
    1.72 +}
    1.73 +
    1.74 +
    1.75 +/* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
    1.76 +
    1.77 +/*
    1.78 + * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
    1.79 + * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
    1.80 + * check on every single element in the document.  If we list all the
    1.81 + * element names for which the UA stylesheet specifies a margin, the
    1.82 + * selectors will be hashed in the RuleHash and things will be much more
    1.83 + * efficient.
    1.84 + */
    1.85 +body > p:-moz-first-node, td > p:-moz-first-node, th > p:-moz-first-node,
    1.86 +body > dl:-moz-first-node, td > dl:-moz-first-node, th > dl:-moz-first-node,
    1.87 +body > multicol:-moz-first-node, td > multicol:-moz-first-node, th > multicol:-moz-first-node,
    1.88 +body > blockquote:-moz-first-node, td > blockquote:-moz-first-node, th > blockquote:-moz-first-node,
    1.89 +body > h1:-moz-first-node, td > h1:-moz-first-node, th > h1:-moz-first-node,
    1.90 +body > h2:-moz-first-node, td > h2:-moz-first-node, th > h2:-moz-first-node,
    1.91 +body > h3:-moz-first-node, td > h3:-moz-first-node, th > h3:-moz-first-node,
    1.92 +body > h4:-moz-first-node, td > h4:-moz-first-node, th > h4:-moz-first-node,
    1.93 +body > h5:-moz-first-node, td > h5:-moz-first-node, th > h5:-moz-first-node,
    1.94 +body > h6:-moz-first-node, td > h6:-moz-first-node, th > h6:-moz-first-node,
    1.95 +body > listing:-moz-first-node, td > listing:-moz-first-node, th > listing:-moz-first-node,
    1.96 +body > plaintext:-moz-first-node, td > plaintext:-moz-first-node, th > plaintext:-moz-first-node,
    1.97 +body > xmp:-moz-first-node, td > xmp:-moz-first-node, th > xmp:-moz-first-node,
    1.98 +body > pre:-moz-first-node, td > pre:-moz-first-node, th > pre:-moz-first-node,
    1.99 +body > ul:-moz-first-node, td > ul:-moz-first-node, th > ul:-moz-first-node,
   1.100 +body > menu:-moz-first-node, td > menu:-moz-first-node, th > menu:-moz-first-node,
   1.101 +body > dir:-moz-first-node, td > dir:-moz-first-node, th > dir:-moz-first-node,
   1.102 +body > ol:-moz-first-node, td > ol:-moz-first-node, th > ol:-moz-first-node {
   1.103 +  margin-top: 0;
   1.104 +}
   1.105 +
   1.106 +td > p:-moz-last-node, th > p:-moz-last-node {
   1.107 +  margin-bottom: 0;
   1.108 +}
   1.109 +
   1.110 +/* Similar as above, but for empty elements
   1.111 + *  collapse the bottom or top margins of empty elements
   1.112 + *  - see bug 97361
   1.113 + */
   1.114 +body > p:-moz-only-whitespace:-moz-first-node,
   1.115 +td > p:-moz-only-whitespace:-moz-first-node, th > p:-moz-only-whitespace:-moz-first-node,
   1.116 +body > dl:-moz-only-whitespace:-moz-first-node, td > dl:-moz-only-whitespace:-moz-first-node,
   1.117 +th > dl:-moz-only-whitespace:-moz-first-node, body > multicol:-moz-only-whitespace:-moz-first-node,
   1.118 +td > multicol:-moz-only-whitespace:-moz-first-node, th > multicol:-moz-only-whitespace:-moz-first-node,
   1.119 +body > blockquote:-moz-only-whitespace:-moz-first-node, td > blockquote:-moz-only-whitespace:-moz-first-node,
   1.120 +th > blockquote:-moz-only-whitespace:-moz-first-node, body > h1:-moz-only-whitespace:-moz-first-node,
   1.121 +td > h1:-moz-only-whitespace:-moz-first-node, th > h1:-moz-only-whitespace:-moz-first-node,
   1.122 +body > h2:-moz-only-whitespace:-moz-first-node, td > h2:-moz-only-whitespace:-moz-first-node,
   1.123 +th > h2:-moz-only-whitespace:-moz-first-node, body > h3:-moz-only-whitespace:-moz-first-node,
   1.124 +td > h3:-moz-only-whitespace:-moz-first-node, th > h3:-moz-only-whitespace:-moz-first-node,
   1.125 +body > h4:-moz-only-whitespace:-moz-first-node, td > h4:-moz-only-whitespace:-moz-first-node,
   1.126 +th > h4:-moz-only-whitespace:-moz-first-node, body > h5:-moz-only-whitespace:-moz-first-node,
   1.127 +td > h5:-moz-only-whitespace:-moz-first-node, th > h5:-moz-only-whitespace:-moz-first-node,
   1.128 +body > h6:-moz-only-whitespace:-moz-first-node, td > h6:-moz-only-whitespace:-moz-first-node,
   1.129 +th > h6:-moz-only-whitespace:-moz-first-node, body > listing:-moz-only-whitespace:-moz-first-node,
   1.130 +td > listing:-moz-only-whitespace:-moz-first-node, th > listing:-moz-only-whitespace:-moz-first-node,
   1.131 +body > plaintext:-moz-only-whitespace:-moz-first-node, td > plaintext:-moz-only-whitespace:-moz-first-node,
   1.132 +th > plaintext:-moz-only-whitespace:-moz-first-node, body > xmp:-moz-only-whitespace:-moz-first-node,
   1.133 +td > xmp:-moz-only-whitespace:-moz-first-node, th > xmp:-moz-only-whitespace:-moz-first-node,
   1.134 +body > pre:-moz-only-whitespace:-moz-first-node, td > pre:-moz-only-whitespace:-moz-first-node,
   1.135 +th > pre:-moz-only-whitespace:-moz-first-node, body > ul:-moz-only-whitespace:-moz-first-node,
   1.136 +td > ul:-moz-only-whitespace:-moz-first-node, th > ul:-moz-only-whitespace:-moz-first-node,
   1.137 +body > menu:-moz-only-whitespace:-moz-first-node, td > menu:-moz-only-whitespace:-moz-first-node,
   1.138 +th > menu:-moz-only-whitespace:-moz-first-node, body > dir:-moz-only-whitespace:-moz-first-node,
   1.139 +td > dir:-moz-only-whitespace:-moz-first-node, th > dir:-moz-only-whitespace:-moz-first-node,
   1.140 +body > ol:-moz-only-whitespace:-moz-first-node, td > ol:-moz-only-whitespace:-moz-first-node,
   1.141 +th > ol:-moz-only-whitespace:-moz-first-node {
   1.142 +  margin-bottom: 0;
   1.143 +}
   1.144 +
   1.145 +td > p:-moz-only-whitespace:-moz-last-node, th > p:-moz-only-whitespace:-moz-last-node,
   1.146 +td > dl:-moz-only-whitespace:-moz-last-node, th > dl:-moz-only-whitespace:-moz-last-node,
   1.147 +td > multicol:-moz-only-whitespace:-moz-last-node, th > multicol:-moz-only-whitespace:-moz-last-node,
   1.148 +td > blockquote:-moz-only-whitespace:-moz-last-node, th > blockquote:-moz-only-whitespace:-moz-last-node,
   1.149 +td > h1:-moz-only-whitespace:-moz-last-node, th > h1:-moz-only-whitespace:-moz-last-node,
   1.150 +td > h2:-moz-only-whitespace:-moz-last-node, th > h2:-moz-only-whitespace:-moz-last-node,
   1.151 +td > h3:-moz-only-whitespace:-moz-last-node, th > h3:-moz-only-whitespace:-moz-last-node,
   1.152 +td > h4:-moz-only-whitespace:-moz-last-node, th > h4:-moz-only-whitespace:-moz-last-node,
   1.153 +td > h5:-moz-only-whitespace:-moz-last-node, th > h5:-moz-only-whitespace:-moz-last-node,
   1.154 +td > h6:-moz-only-whitespace:-moz-last-node, th > h6:-moz-only-whitespace:-moz-last-node,
   1.155 +td > listing:-moz-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node,
   1.156 +td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node,
   1.157 +td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node,
   1.158 +td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node,
   1.159 +td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
   1.160 +td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
   1.161 +td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
   1.162 +td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
   1.163 +  margin-top: 0;
   1.164 +}
   1.165 +
   1.166 +
   1.167 +/* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
   1.168 +
   1.169 +:not(dl) > dd {
   1.170 +  display: inline;
   1.171 +  margin: 0;
   1.172 +}
   1.173 +
   1.174 +:not(dl) > dd:before {
   1.175 +  display: inline;
   1.176 +  white-space: pre;
   1.177 +  font-size: 1px;
   1.178 +  line-height: 0;
   1.179 +  content: "\A  ";
   1.180 +  -moz-margin-end: 40px;
   1.181 +}
   1.182 +
   1.183 +
   1.184 +/* quirk to indent nested DL elements (b=8749) */
   1.185 +
   1.186 +dl > dl {
   1.187 +  display: block;
   1.188 +  -moz-margin-start: 40px;
   1.189 +}
   1.190 +
   1.191 +
   1.192 +/* Quirk: Make floated images have a margin  (b=58899) */
   1.193 +
   1.194 +img[align=left] {
   1.195 +  margin-right: 3px;
   1.196 +}
   1.197 +
   1.198 +img[align=right] {
   1.199 +  margin-left: 3px;
   1.200 +}
   1.201 +
   1.202 +/*
   1.203 + * Quirk: Use border-box box sizing for text inputs, password inputs, and
   1.204 + * textareas.  (b=184478 on why we use content-box sizing in standards mode)
   1.205 + */
   1.206 +
   1.207 +/* Note that all other <input>s already use border-box
   1.208 +   sizing, so we're ok with this selector */
   1.209 +input:not([type=image]), textarea {
   1.210 +  box-sizing: border-box;
   1.211 +}
   1.212 +
   1.213 +/* Quirk: give form margin for compat (b=41806) */
   1.214 +form {
   1.215 +  margin-bottom: 1em;
   1.216 +}

mercurial