Mozilla Cross-Reference seamonkey
mozilla/ layout/ style/ quirk.css
CVS Log
CVS Blame
CVS Graph
Diff file
Raw file
changes to
this file in
the last:
day
week
month
view using tree:
1 /* ***** BEGIN LICENSE BLOCK *****
2  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3  *
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/
8  *
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.
13  *
14  * The Original Code is mozilla.org code.
15  *
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.
20  *
21  * Contributor(s):
22  *
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.
34  *
35  * ***** END LICENSE BLOCK ***** */
36 
37 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
38 
39 
40 /* Quirk: input images have a blue border (b=28010) */ 
41 
42 /* default border */
43 input[type=image] {
44   border: 2px solid blue;
45 }
46 
47 /* border when disabled -- only change color to gray */
48 input[type=image][disabled] {
49   border-color: GrayText;
50 }
51 
52 
53 /* Quirk: make orphaned LIs have inside bullet (b=1049) */
54 
55 /* force inside position for orphaned lis */
56 li {
57   list-style-position: inside; 
58 }
59 
60 /* restore outside position for lists inside LIs */
61 li ul, li ol, li dir, li menu { 
62   list-style-position: outside; 
63 }
64 
65 /* undo previous two rules for properly nested lists */
66   ul ul,   ul ol,   ul dir,   ul menu,   ul li,
67   ol ul,   ol ol,   ol dir,   ol menu,   ol li,
68  dir ul,  dir ol,  dir dir,  dir menu,  dir li,
69 menu ul, menu ol, menu dir, menu menu, menu li {
70   list-style-position: inherit;
71 }
72 
73 
74 /* Quirk: ensure that we get proper padding if the very first 
75  * node in an LI is another UL or OL. This is an ugly way to
76  * fix the problem, because it extends the LI up into what
77  * would otherwise appear to be the ULs space. (b=38832) */
78 
79 /* Note: this fix will fail once we implement marker box 
80  * alignment correctly. */
81 li > ul:-moz-first-node,
82 li > ol:-moz-first-node {
83   padding-top: 1em;
84 }
85 
86 
87 /* Quirk: prevent bullet from resizing with the list item
88  *   see bug 97351
89  */
90 
91 li::-moz-list-bullet {
92   font-size: -moz-initial;
93 }
94 
95 
96 table {
97   text-align: start;
98   white-space: normal; /* compatible with IE & spec */
99   line-height: normal;
100 
101   /* Quirk: cut off all font inheritance in tables except for family. */
102   font-size: -moz-initial;
103   font-weight: -moz-initial;
104   font-style: -moz-initial;
105   font-variant: -moz-initial;
106 }
107 
108 /*
109  * Make table borders gray for compatibility with what other browsers do
110  * in all modes, rather than using the foreground color.
111  */
112 table, td, th {
113   border-color: gray;
114 }
115 
116 
117 /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
118 
119 /*
120  * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
121  * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
122  * check on every single element in the document.  If we list all the
123  * element names for which the UA stylesheet specifies a margin, the
124  * selectors will be hashed in the RuleHash and things will be much more
125  * efficient.
126  */
127 body > p:-moz-first-node, td > p:-moz-first-node, th > p:-moz-first-node,
128 body > dl:-moz-first-node, td > dl:-moz-first-node, th > dl:-moz-first-node,
129 body > multicol:-moz-first-node, td > multicol:-moz-first-node, th > multicol:-moz-first-node,
130 body > blockquote:-moz-first-node, td > blockquote:-moz-first-node, th > blockquote:-moz-first-node,
131 body > h1:-moz-first-node, td > h1:-moz-first-node, th > h1:-moz-first-node,
132 body > h2:-moz-first-node, td > h2:-moz-first-node, th > h2:-moz-first-node,
133 body > h3:-moz-first-node, td > h3:-moz-first-node, th > h3:-moz-first-node,
134 body > h4:-moz-first-node, td > h4:-moz-first-node, th > h4:-moz-first-node,
135 body > h5:-moz-first-node, td > h5:-moz-first-node, th > h5:-moz-first-node,
136 body > h6:-moz-first-node, td > h6:-moz-first-node, th > h6:-moz-first-node,
137 body > listing:-moz-first-node, td > listing:-moz-first-node, th > listing:-moz-first-node,
138 body > plaintext:-moz-first-node, td > plaintext:-moz-first-node, th > plaintext:-moz-first-node,
139 body > xmp:-moz-first-node, td > xmp:-moz-first-node, th > xmp:-moz-first-node,
140 body > pre:-moz-first-node, td > pre:-moz-first-node, th > pre:-moz-first-node,
141 body > ul:-moz-first-node, td > ul:-moz-first-node, th > ul:-moz-first-node,
142 body > menu:-moz-first-node, td > menu:-moz-first-node, th > menu:-moz-first-node,
143 body > dir:-moz-first-node, td > dir:-moz-first-node, th > dir:-moz-first-node,
144 body > ol:-moz-first-node, td > ol:-moz-first-node, th > ol:-moz-first-node {
145   margin-top: 0;
146 }
147 
148 td > p:-moz-last-node, th > p:-moz-last-node {
149   margin-bottom: 0;
150 }
151 
152 /* Similar as above, but for empty elements
153  *  collapse the bottom or top margins of empty elements
154  *  - see bug 97361
155  */
156 body > p:-moz-only-whitespace:-moz-first-node,
157 td > p:-moz-only-whitespace:-moz-first-node, th > p:-moz-only-whitespace:-moz-first-node,
158 body > dl:-moz-only-whitespace:-moz-first-node, td > dl:-moz-only-whitespace:-moz-first-node,
159 th > dl:-moz-only-whitespace:-moz-first-node, body > multicol:-moz-only-whitespace:-moz-first-node,
160 td > multicol:-moz-only-whitespace:-moz-first-node, th > multicol:-moz-only-whitespace:-moz-first-node,
161 body > blockquote:-moz-only-whitespace:-moz-first-node, td > blockquote:-moz-only-whitespace:-moz-first-node,
162 th > blockquote:-moz-only-whitespace:-moz-first-node, body > h1:-moz-only-whitespace:-moz-first-node,
163 td > h1:-moz-only-whitespace:-moz-first-node, th > h1:-moz-only-whitespace:-moz-first-node,
164 body > h2:-moz-only-whitespace:-moz-first-node, td > h2:-moz-only-whitespace:-moz-first-node,
165 th > h2:-moz-only-whitespace:-moz-first-node, body > h3:-moz-only-whitespace:-moz-first-node,
166 td > h3:-moz-only-whitespace:-moz-first-node, th > h3:-moz-only-whitespace:-moz-first-node,
167 body > h4:-moz-only-whitespace:-moz-first-node, td > h4:-moz-only-whitespace:-moz-first-node,
168 th > h4:-moz-only-whitespace:-moz-first-node, body > h5:-moz-only-whitespace:-moz-first-node,
169 td > h5:-moz-only-whitespace:-moz-first-node, th > h5:-moz-only-whitespace:-moz-first-node,
170 body > h6:-moz-only-whitespace:-moz-first-node, td > h6:-moz-only-whitespace:-moz-first-node,
171 th > h6:-moz-only-whitespace:-moz-first-node, body > listing:-moz-only-whitespace:-moz-first-node,
172 td > listing:-moz-only-whitespace:-moz-first-node, th > listing:-moz-only-whitespace:-moz-first-node,
173 body > plaintext:-moz-only-whitespace:-moz-first-node, td > plaintext:-moz-only-whitespace:-moz-first-node,
174 th > plaintext:-moz-only-whitespace:-moz-first-node, body > xmp:-moz-only-whitespace:-moz-first-node,
175 td > xmp:-moz-only-whitespace:-moz-first-node, th > xmp:-moz-only-whitespace:-moz-first-node,
176 body > pre:-moz-only-whitespace:-moz-first-node, td > pre:-moz-only-whitespace:-moz-first-node,
177 th > pre:-moz-only-whitespace:-moz-first-node, body > ul:-moz-only-whitespace:-moz-first-node,
178 td > ul:-moz-only-whitespace:-moz-first-node, th > ul:-moz-only-whitespace:-moz-first-node,
179 body > menu:-moz-only-whitespace:-moz-first-node, td > menu:-moz-only-whitespace:-moz-first-node,
180 th > menu:-moz-only-whitespace:-moz-first-node, body > dir:-moz-only-whitespace:-moz-first-node,
181 td > dir:-moz-only-whitespace:-moz-first-node, th > dir:-moz-only-whitespace:-moz-first-node,
182 body > ol:-moz-only-whitespace:-moz-first-node, td > ol:-moz-only-whitespace:-moz-first-node,
183 th > ol:-moz-only-whitespace:-moz-first-node {
184   margin-bottom: 0;
185 }
186 
187 td > p:-moz-only-whitespace:-moz-last-node, th > p:-moz-only-whitespace:-moz-last-node,
188 td > dl:-moz-only-whitespace:-moz-last-node, th > dl:-moz-only-whitespace:-moz-last-node,
189 td > multicol:-moz-only-whitespace:-moz-last-node, th > multicol:-moz-only-whitespace:-moz-last-node,
190 td > blockquote:-moz-only-whitespace:-moz-last-node, th > blockquote:-moz-only-whitespace:-moz-last-node,
191 td > h1:-moz-only-whitespace:-moz-last-node, th > h1:-moz-only-whitespace:-moz-last-node,
192 td > h2:-moz-only-whitespace:-moz-last-node, th > h2:-moz-only-whitespace:-moz-last-node,
193 td > h3:-moz-only-whitespace:-moz-last-node, th > h3:-moz-only-whitespace:-moz-last-node,
194 td > h4:-moz-only-whitespace:-moz-last-node, th > h4:-moz-only-whitespace:-moz-last-node,
195 td > h5:-moz-only-whitespace:-moz-last-node, th > h5:-moz-only-whitespace:-moz-last-node,
196 td > h6:-moz-only-whitespace:-moz-last-node, th > h6:-moz-only-whitespace:-moz-last-node,
197 td > listing:-moz-only-whitespace:-moz-last-node, th > listing:-moz-only-whitespace:-moz-last-node,
198 td > plaintext:-moz-only-whitespace:-moz-last-node, th > plaintext:-moz-only-whitespace:-moz-last-node,
199 td > xmp:-moz-only-whitespace:-moz-last-node, th > xmp:-moz-only-whitespace:-moz-last-node,
200 td > pre:-moz-only-whitespace:-moz-last-node, th > pre:-moz-only-whitespace:-moz-last-node,
201 td > ul:-moz-only-whitespace:-moz-last-node, th > ul:-moz-only-whitespace:-moz-last-node,
202 td > menu:-moz-only-whitespace:-moz-last-node, th > menu:-moz-only-whitespace:-moz-last-node,
203 td > dir:-moz-only-whitespace:-moz-last-node, th > dir:-moz-only-whitespace:-moz-last-node,
204 td > ol:-moz-only-whitespace:-moz-last-node, th > ol:-moz-only-whitespace:-moz-last-node {
205   margin-top: 0;
206 }
207 
208 
209 /* Quirk: support the ways of making PRE have wrapping */
210 
211 pre[wrap], pre[cols], pre[width] {
212   white-space: pre-wrap;
213 }
214 
215 
216 /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
217 
218 :not(dl) > dd {
219   display: inline;
220   margin: 0;
221 }
222 
223 :not(dl) > dd:before {
224   display: inline;
225   white-space: pre;
226   font-size: 1px;
227   line-height: 0;
228   content: "\A  ";
229   -moz-margin-end: 40px;
230 }
231 
232 
233 /* quirk to indent nested DL elements (b=8749) */
234 
235 dl > dl {
236   display: block;
237   -moz-margin-start: 40px;
238 }
239 
240 
241 /* Quirk: MAP acts like an inline, not a block */
242 
243 map {
244   display: inline;
245 }
246 
247 
248 /* Quirk: Make floated images have a margin  (b=58899) */
249 
250 img[align=left] {
251   margin-right: 3px;
252 }
253 
254 img[align=right] {
255   margin-left: 3px;
256 }
257 
258 
259 /* Quirk: Make sure that the residual style tags' size info. 
260  * does not take precedence over heading tags' size. (b=77352)
261  * Note: This special attribute is set only for a residual 
262  * style tag within a heading tag.
263  */
264 
265 /* XXX This is a potential performance problem.  This should not be
266  * using an attribute!
267  */
268 *[_moz-rs-heading] { 
269   font-size: inherit !important; 
270 }
271 
272 
273 /*
274  * Quirk: Use border-box box sizing for text inputs, password inputs, and
275  * textareas.  (b=184478 on why we use content-box sizing in standards mode)
276  */
277 
278 /* Note that all other <input>s already use border-box
279    sizing, so we're ok with this selector */
280 input:not([type=image]), textarea {
281   -moz-box-sizing: border-box;
282 }
283 
284 /* Quirk: give form margin for compat (b=41806) */
285 form{
286  margin-bottom: 1em;
287 }