Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / layout / style / quirk.css
blob9c3042d980546b986c240357cb43bb4bae35942e
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is mozilla.org code.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 1998
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
23 * Alternatively, the contents of this file may be used under the terms of
24 * either of the GNU General Public License Version 2 or later (the "GPL"),
25 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
37 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
40 /* Quirk: make orphaned LIs have inside bullet (b=1049) */
42 /* force inside position for orphaned lis */
43 li {
44 list-style-position: inside;
47 /* restore outside position for lists inside LIs */
48 li ul, li ol, li dir, li menu {
49 list-style-position: outside;
52 /* undo previous two rules for properly nested lists */
53 ul ul, ul ol, ul dir, ul menu, ul li,
54 ol ul, ol ol, ol dir, ol menu, ol li,
55 dir ul, dir ol, dir dir, dir menu, dir li,
56 menu ul, menu ol, menu dir, menu menu, menu li {
57 list-style-position: inherit;
61 /* Quirk: ensure that we get proper padding if the very first
62 * node in an LI is another UL or OL. This is an ugly way to
63 * fix the problem, because it extends the LI up into what
64 * would otherwise appear to be the ULs space. (b=38832) */
66 /* Note: this fix will fail once we implement marker box
67 * alignment correctly. */
68 li > ul:-moz-first-node,
69 li > ol:-moz-first-node {
70 padding-top: 1em;
74 /* Quirk: prevent bullet from resizing with the list item
75 * see bug 97351
78 li::-moz-list-bullet {
79 font-size: -moz-initial;
83 table {
84 text-align: start;
85 white-space: normal; /* compatible with IE & spec */
86 line-height: normal;
88 /* Quirk: cut off all font inheritance in tables except for family. */
89 font-size: -moz-initial;
90 font-weight: -moz-initial;
91 font-style: -moz-initial;
92 font-variant: -moz-initial;
96 * Make table borders gray for compatibility with what other browsers do
97 * in all modes, rather than using the foreground color.
99 table, td, th {
100 border-color: gray;
104 /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
107 * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
108 * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
109 * check on every single element in the document. If we list all the
110 * element names for which the UA stylesheet specifies a margin, the
111 * selectors will be hashed in the RuleHash and things will be much more
112 * efficient.
114 body > p:-moz-first-node, td > p:-moz-first-node, th > p:-moz-first-node,
115 body > dl:-moz-first-node, td > dl:-moz-first-node, th > dl:-moz-first-node,
116 body > multicol:-moz-first-node, td > multicol:-moz-first-node, th > multicol:-moz-first-node,
117 body > blockquote:-moz-first-node, td > blockquote:-moz-first-node, th > blockquote:-moz-first-node,
118 body > h1:-moz-first-node, td > h1:-moz-first-node, th > h1:-moz-first-node,
119 body > h2:-moz-first-node, td > h2:-moz-first-node, th > h2:-moz-first-node,
120 body > h3:-moz-first-node, td > h3:-moz-first-node, th > h3:-moz-first-node,
121 body > h4:-moz-first-node, td > h4:-moz-first-node, th > h4:-moz-first-node,
122 body > h5:-moz-first-node, td > h5:-moz-first-node, th > h5:-moz-first-node,
123 body > h6:-moz-first-node, td > h6:-moz-first-node, th > h6:-moz-first-node,
124 body > listing:-moz-first-node, td > listing:-moz-first-node, th > listing:-moz-first-node,
125 body > plaintext:-moz-first-node, td > plaintext:-moz-first-node, th > plaintext:-moz-first-node,
126 body > xmp:-moz-first-node, td > xmp:-moz-first-node, th > xmp:-moz-first-node,
127 body > pre:-moz-first-node, td > pre:-moz-first-node, th > pre:-moz-first-node,
128 body > ul:-moz-first-node, td > ul:-moz-first-node, th > ul:-moz-first-node,
129 body > menu:-moz-first-node, td > menu:-moz-first-node, th > menu:-moz-first-node,
130 body > dir:-moz-first-node, td > dir:-moz-first-node, th > dir:-moz-first-node,
131 body > ol:-moz-first-node, td > ol:-moz-first-node, th > ol:-moz-first-node {
132 margin-top: 0;
135 td > p:-moz-last-node, th > p:-moz-last-node {
136 margin-bottom: 0;
139 /* Similar as above, but for empty elements
140 * collapse the bottom or top margins of empty elements
141 * - see bug 97361
143 body > p:-moz-only-whitespace:-moz-first-node,
144 td > p:-moz-only-whitespace:-moz-first-node, th > p:-moz-only-whitespace:-moz-first-node,
145 body > dl:-moz-only-whitespace:-moz-first-node, td > dl:-moz-only-whitespace:-moz-first-node,
146 th > dl:-moz-only-whitespace:-moz-first-node, body > multicol:-moz-only-whitespace:-moz-first-node,
147 td > multicol:-moz-only-whitespace:-moz-first-node, th > multicol:-moz-only-whitespace:-moz-first-node,
148 body > blockquote:-moz-only-whitespace:-moz-first-node, td > blockquote:-moz-only-whitespace:-moz-first-node,
149 th > blockquote:-moz-only-whitespace:-moz-first-node, body > h1:-moz-only-whitespace:-moz-first-node,
150 td > h1:-moz-only-whitespace:-moz-first-node, th > h1:-moz-only-whitespace:-moz-first-node,
151 body > h2:-moz-only-whitespace:-moz-first-node, td > h2:-moz-only-whitespace:-moz-first-node,
152 th > h2:-moz-only-whitespace:-moz-first-node, body > h3:-moz-only-whitespace:-moz-first-node,
153 td > h3:-moz-only-whitespace:-moz-first-node, th > h3:-moz-only-whitespace:-moz-first-node,
154 body > h4:-moz-only-whitespace:-moz-first-node, td > h4:-moz-only-whitespace:-moz-first-node,
155 th > h4:-moz-only-whitespace:-moz-first-node, body > h5:-moz-only-whitespace:-moz-first-node,
156 td > h5:-moz-only-whitespace:-moz-first-node, th > h5:-moz-only-whitespace:-moz-first-node,
157 body > h6:-moz-only-whitespace:-moz-first-node, td > h6:-moz-only-whitespace:-moz-first-node,
158 th > h6:-moz-only-whitespace:-moz-first-node, body > listing:-moz-only-whitespace:-moz-first-node,
159 td > listing:-moz-only-whitespace:-moz-first-node, th > listing:-moz-only-whitespace:-moz-first-node,
160 body > plaintext:-moz-only-whitespace:-moz-first-node, td > plaintext:-moz-only-whitespace:-moz-first-node,
161 th > plaintext:-moz-only-whitespace:-moz-first-node, body > xmp:-moz-only-whitespace:-moz-first-node,
162 td > xmp:-moz-only-whitespace:-moz-first-node, th > xmp:-moz-only-whitespace:-moz-first-node,
163 body > pre:-moz-only-whitespace:-moz-first-node, td > pre:-moz-only-whitespace:-moz-first-node,
164 th > pre:-moz-only-whitespace:-moz-first-node, body > ul:-moz-only-whitespace:-moz-first-node,
165 td > ul:-moz-only-whitespace:-moz-first-node, th > ul:-moz-only-whitespace:-moz-first-node,
166 body > menu:-moz-only-whitespace:-moz-first-node, td > menu:-moz-only-whitespace:-moz-first-node,
167 th > menu:-moz-only-whitespace:-moz-first-node, body > dir:-moz-only-whitespace:-moz-first-node,
168 td > dir:-moz-only-whitespace:-moz-first-node, th > dir:-moz-only-whitespace:-moz-first-node,
169 body > ol:-moz-only-whitespace:-moz-first-node, td > ol:-moz-only-whitespace:-moz-first-node,
170 th > ol:-moz-only-whitespace:-moz-first-node {
171 margin-bottom: 0;
174 td > p:-moz-only-whitespace:-moz-last-node, th > p:-moz-only-whitespace:-moz-last-node,
175 td > dl:-moz-only-whitespace:-moz-last-node, th > dl:-moz-only-whitespace:-moz-last-node,
176 td > multicol:-moz-only-whitespace:-moz-last-node, th > multicol:-moz-only-whitespace:-moz-last-node,
177 td > blockquote:-moz-only-whitespace:-moz-last-node, th > blockquote:-moz-only-whitespace:-moz-last-node,
178 td > h1:-moz-only-whitespace:-moz-last-node, th > h1:-moz-only-whitespace:-moz-last-node,
179 td > h2:-moz-only-whitespace:-moz-last-node, th > h2:-moz-only-whitespace:-moz-last-node,
180 td > h3:-moz-only-whitespace:-moz-last-node, th > h3:-moz-only-whitespace:-moz-last-node,
181 td > h4:-moz-only-whitespace:-moz-last-node, th > h4:-moz-only-whitespace:-moz-last-node,
182 td > h5:-moz-only-whitespace:-moz-last-node, th > h5:-moz-only-whitespace:-moz-last-node,
183 td > h6:-moz-only-whitespace:-moz-last-node, th > h6:-moz-only-whitespace:-moz-last-node,
184 td > listing:-moz-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node,
185 td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node,
186 td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node,
187 td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node,
188 td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
189 td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
190 td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
191 td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
192 margin-top: 0;
196 /* Quirk: support the ways of making PRE have wrapping */
198 pre[wrap], pre[cols], pre[width] {
199 white-space: pre-wrap;
203 /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
205 :not(dl) > dd {
206 display: inline;
207 margin: 0;
210 :not(dl) > dd:before {
211 display: inline;
212 white-space: pre;
213 font-size: 1px;
214 line-height: 0;
215 content: "\A ";
216 -moz-margin-end: 40px;
220 /* quirk to indent nested DL elements (b=8749) */
222 dl > dl {
223 display: block;
224 -moz-margin-start: 40px;
228 /* Quirk: MAP acts like an inline, not a block */
230 map {
231 display: inline;
235 /* Quirk: Make floated images have a margin (b=58899) */
237 img[align=left] {
238 margin-right: 3px;
241 img[align=right] {
242 margin-left: 3px;
246 /* Quirk: Make sure that the residual style tags' size info.
247 * does not take precedence over heading tags' size. (b=77352)
248 * Note: This special attribute is set only for a residual
249 * style tag within a heading tag.
252 /* XXX This is a potential performance problem. This should not be
253 * using an attribute!
255 *[_moz-rs-heading] {
256 font-size: inherit !important;
261 * Quirk: Use border-box box sizing for text inputs, password inputs, and
262 * textareas. (b=184478 on why we use content-box sizing in standards mode)
265 /* Note that all other <input>s already use border-box
266 sizing, so we're ok with this selector */
267 input:not([type=image]), textarea {
268 -moz-box-sizing: border-box;
271 /* Quirk: give form margin for compat (b=41806) */
272 form{
273 margin-bottom: 1em;