Mozilla Cross-Reference mozilla
mozilla/ layout/ style/ html.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  *   Blake Ross <BlakeR1234@aol.com>
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either of the GNU General Public License Version 2 or later (the "GPL"),
26  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27  * in which case the provisions of the GPL or the LGPL are applicable instead
28  * of those above. If you wish to allow use of your version of this file only
29  * under the terms of either the GPL or the LGPL, and not to allow others to
30  * use your version of this file under the terms of the MPL, indicate your
31  * decision by deleting the provisions above and replace them with the notice
32  * and other provisions required by the GPL or the LGPL. If you do not delete
33  * the provisions above, a recipient may use your version of this file under
34  * the terms of any one of the MPL, the GPL or the LGPL.
35  *
36  * ***** END LICENSE BLOCK ***** */
37 
38 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
39 
40 /* bidi */
41 
42 [dir="rtl"] {
43   direction: rtl;
44   unicode-bidi: embed;
45 }
46 [dir="ltr"] {
47   direction: ltr;
48   unicode-bidi: embed;
49 }
50 bdo[dir] {
51   unicode-bidi: bidi-override;
52 }
53 
54 /* blocks */
55 
56 html, div, map, dt, isindex, form {
57   display: block;
58 }
59 
60 body {
61   display: block;
62   margin: 8px;
63 }
64 
65 p, dl, multicol {
66   display: block;
67   margin: 1em 0;
68 }
69 
70 dd {
71   display: block;
72   -moz-margin-start: 40px;
73 }
74 
75 blockquote {
76   display: block;
77   margin: 1em 40px;
78 }
79 
80 address {
81   display: block;
82   font-style: italic;
83 }
84 
85 center {
86   display: block;
87   text-align: -moz-center;
88 }
89 
90 blockquote[type=cite] {
91   display: block;
92   margin: 1em 0px;
93   -moz-padding-start: 1em;
94   -moz-border-start: solid;
95   border-color: blue;
96   border-width: thin;
97 }
98 
99 span[_moz_quote=true] {
100   color: blue;
101 }
102 
103 pre[_moz_quote=true] {
104   color: blue;
105 }
106 
107 h1 {
108   display: block;
109   font-size: 2em;
110   font-weight: bold;
111   margin: .67em 0;
112 }
113 
114 h2 {
115   display: block;
116   font-size: 1.5em;
117   font-weight: bold;
118   margin: .83em 0;
119 }
120 
121 h3 {
122   display: block;
123   font-size: 1.17em;
124   font-weight: bold;
125   margin: 1em 0;
126 }
127 
128 h4 {
129   display: block;
130   font-weight: bold;
131   margin: 1.33em 0;
132 }
133 
134 h5 {
135   display: block;
136   font-size: 0.83em;
137   font-weight: bold;
138   margin: 1.67em 0;
139 }
140 
141 h6 {
142   display: block;
143   font-size: 0.67em;
144   font-weight: bold;
145   margin: 2.33em 0;
146 }
147 
148 listing {
149   display: block;
150   font-family: -moz-fixed;
151   font-size: medium;
152   white-space: pre;
153   margin: 1em 0;
154 }
155 
156 xmp, pre, plaintext {
157   display: block;
158   font-family: -moz-fixed;
159   white-space: pre;
160   margin: 1em 0;
161 }
162 
163 /* tables */
164 
165 table {
166   display: table;
167   border-spacing: 2px;
168   border-collapse: separate;
169   margin-top: 0;
170   margin-bottom: 0;
171   /* XXXldb do we want this if we're border-collapse:collapse ? */
172   -moz-box-sizing: border-box;
173   text-indent: 0;
174 }
175 
176 table[align="left"] {
177   float: left;
178 }
179 
180 table[align="right"] {
181   float: right;
182   text-align: start;
183 }
184 
185 table[rules]:not([rules="none"]) {
186   border-collapse: collapse;
187 }
188    
189 /* caption inherits from table not table-outer */  
190 caption {
191   display: table-caption;
192   text-align: center;
193   -moz-box-sizing: border-box;
194 }
195 
196 table[align="center"] > caption {
197   margin-left: auto;
198   margin-right: auto;
199 }
200 
201 table[align="center"] > caption[align="left"] {
202   margin-right: 0;
203 }
204 
205 table[align="center"] > caption[align="right"] {
206   margin-left: 0;
207 }
208 
209 tr {
210   display: table-row;
211   vertical-align: inherit;
212 }
213 
214 col {
215   display: table-column;
216 }
217 
218 colgroup {
219   display: table-column-group;
220 }
221 
222 tbody {
223   display: table-row-group;
224   vertical-align: middle;
225 }
226 
227 thead {
228   display: table-header-group;
229   vertical-align: middle;
230 }
231 
232 tfoot {
233   display: table-footer-group;
234   vertical-align: middle;
235 }
236 
237 /* for XHTML tables without tbody */
238 table > tr {
239   vertical-align: middle;
240 }
241 
242 td { 
243   display: table-cell;
244   vertical-align: inherit;
245   text-align: inherit; 
246   padding: 1px;
247 }
248 
249 th {
250   display: table-cell;
251   vertical-align: inherit;
252   font-weight: bold;
253   padding: 1px;
254 }
255 
256 tr > form:-moz-is-html, tbody > form:-moz-is-html,
257 thead > form:-moz-is-html, tfoot > form:-moz-is-html,
258 table > form:-moz-is-html {
259   /* Important: don't show these forms in HTML */
260   display: none !important;
261 }
262 
263 /* inlines */
264 
265 q:before {
266   content: open-quote;
267 }
268 
269 q:after {
270   content: close-quote;
271 }
272 
273 b, strong {
274   font-weight: bolder;
275 }
276 
277 i, cite, em, var, dfn {
278   font-style: italic;
279 }
280 
281 tt, code, kbd, samp {
282   font-family: -moz-fixed;
283 }
284 
285 u, ins {
286   text-decoration: underline;
287 }
288 
289 s, strike, del {
290   text-decoration: line-through;
291 }
292 
293 blink {
294   text-decoration: blink;
295 }
296 
297 big {
298   font-size: larger;
299 }
300 
301 small {
302   font-size: smaller;
303 }
304 
305 sub {
306   vertical-align: sub;
307   font-size: smaller;
308   line-height: normal;
309 }
310 
311 sup {
312   vertical-align: super;
313   font-size: smaller;
314   line-height: normal;
315 }
316 
317 nobr {
318   white-space: nowrap;
319 }
320 
321 /* titles */
322 abbr[title], acronym[title] {
323   border-bottom: dotted 1px;
324 }
325 
326 /* lists */
327 
328 ul, menu, dir {
329   display: block;
330   list-style-type: disc;
331   margin: 1em 0;
332   -moz-padding-start: 40px;
333 }
334 
335 ol {
336   display: block;
337   list-style-type: decimal;
338   margin: 1em 0;
339   -moz-padding-start: 40px;
340 }
341 
342 li {
343   display: list-item;
344 }
345 
346 /* nested lists have no top/bottom margins */
347 ul ul,   ul ol,   ul dir,   ul menu,   ul dl,
348 ol ul,   ol ol,   ol dir,   ol menu,   ol dl,
349 dir ul,  dir ol,  dir dir,  dir menu,  dir dl,
350 menu ul, menu ol, menu dir, menu menu, menu dl,
351 dl ul,   dl ol,   dl dir,   dl menu,   dl dl {
352   margin-top: 0;
353   margin-bottom: 0;
354 }
355 
356 /* 2 deep unordered lists use a circle */
357 ol ul,   ul ul,   menu ul,   dir ul,
358 ol menu, ul menu, menu menu, dir menu,
359 ol dir,  ul dir,  menu dir,  dir dir {
360   list-style-type: circle;
361 }
362 
363 /* 3 deep (or more) unordered lists use a square */
364 ol ol ul,     ol ul ul,     ol menu ul,     ol dir ul,
365 ol ol menu,   ol ul menu,   ol menu menu,   ol dir menu,
366 ol ol dir,    ol ul dir,    ol menu dir,    ol dir dir,
367 ul ol ul,     ul ul ul,     ul menu ul,     ul dir ul,
368 ul ol menu,   ul ul menu,   ul menu menu,   ul dir menu,
369 ul ol dir,    ul ul dir,    ul menu dir,    ul dir dir,
370 menu ol ul,   menu ul ul,   menu menu ul,   menu dir ul,
371 menu ol menu, menu ul menu, menu menu menu, menu dir menu,
372 menu ol dir,  menu ul dir,  menu menu dir,  menu dir dir,
373 dir ol ul,    dir ul ul,    dir menu ul,    dir dir ul,
374 dir ol menu,  dir ul menu,  dir menu menu,  dir dir menu,
375 dir ol dir,   dir ul dir,   dir menu dir,   dir dir dir {
376   list-style-type: square;
377 }
378 
379 
380 /* leafs */
381 
382 /* <hr> noshade and color attributes are handled completely by
383  * the nsHTMLHRElement attribute mapping code
384  */
385 hr {
386   display: block;
387   height: 2px;
388   border: 1px inset;
389   margin: 0.5em auto 0.5em auto;
390   color: gray;
391   -moz-float-edge: margin-box;
392   -moz-box-sizing: border-box;
393 }
394 
395 hr[size="1"] {
396   border-style: solid none none none;
397 }
398 
399 *|*:-moz-any-link img, img[usemap], object[usemap] {
400   border: 2px solid;
401 }
402 
403 img:-moz-broken::before, input:-moz-broken::before,
404 img:-moz-user-disabled::before, input:-moz-user-disabled::before,
405 img:-moz-loading::before, input:-moz-loading::before,
406 applet:-moz-empty-except-children-with-localname(param):-moz-broken::before,
407 applet:-moz-empty-except-children-with-localname(param):-moz-user-disabled::before {
408   content: -moz-alt-content !important;
409   unicode-bidi: embed;
410 }
411 
412 object:-moz-broken > *|*, applet:-moz-broken > *|*
413 object:-moz-user-disabled > *|*, applet:-moz-user-disabled > *|* {
414   /*
415     Inherit in the object's alignment so that if we aren't aligned explicitly
416     we'll end up in the right place vertically.  See bug 36997.  Note that this
417     is not !important because we _might_ be aligned explicitly.
418   */
419   vertical-align: inherit;
420 }
421 
422 img:-moz-suppressed, input:-moz-suppressed, object:-moz-suppressed,
423 embed:-moz-suppressed, applet:-moz-suppressed {
424   /*
425     Set visibility too in case the page changes display.  Note that we _may_
426     want to just set visibility and not display, in general, if we find that
427     display:none breaks too many layouts.  And if we decide we really do want
428     people to be able to right-click blocked images, etc, we need to set
429     neither one, and hack the painting code.... :(
430    */
431   display: none !important;
432   visibility: hidden !important;
433 }
434 
435 img[usemap], object[usemap] {
436   color: blue;
437 }
438 
439 frameset {
440   display: block ! important;
441   overflow: -moz-hidden-unscrollable;
442   position: static ! important;
443   float: none ! important;
444   border: none ! important;
445 }
446 
447 frame {
448   border: none ! important;
449 }
450 
451 iframe {
452   border: 2px inset;
453 }
454 
455 noframes {
456   display: none;
457 }
458 
459 spacer {
460   position: static ! important;
461   float: none ! important;
462 }
463 
464 canvas {
465   -moz-user-select: none;
466 }
467 
468 /* focusable content: anything w/ tabindex >=0 is focusable */
469 abbr:focus, acronym:focus, address:focus, applet:focus, b:focus, 
470 base:focus, big:focus, blockquote:focus, br:focus, canvas:focus, caption:focus,
471 center:focus, cite:focus, code:focus, col:focus, colgroup:focus, dd:focus,
472 del:focus, dfn:focus, dir:focus, div:focus, dl:focus, dt:focus, em:focus,
473 fieldset:focus, font:focus, form:focus, h1:focus, h2:focus, h3:focus, h4:focus,
474 h5:focus, h6:focus, hr:focus, i:focus, img:focus, ins:focus, 
475 kbd:focus, label:focus, legend:focus, li:focus, link:focus, menu:focus, 
476 object:focus, ol:focus, p:focus, pre:focus, q:focus, s:focus, samp:focus, 
477 small:focus, span:focus, strike:focus, strong:focus, sub:focus, sup:focus, 
478 table:focus, tbody:focus, td:focus, tfoot:focus, th:focus, thead:focus, 
479 tr:focus, tt:focus, u:focus, ul:focus, var:focus {
480   /* Don't specify the outline-color, we should always use initial value. */
481    outline: 1px dotted;
482 }
483 
484 /* hidden elements */
485 area, base, basefont, head, meta, script, style, title,
486 noembed, param {
487    display: none;
488 }
489 
490 /* emulation of non-standard HTML <marquee> tag */
491 marquee {
492   width: -moz-available;
493   display: inline-block;
494   vertical-align: text-bottom;
495   text-align: start;
496   -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal');
497 }
498 
499 marquee[direction="up"], marquee[direction="down"] {
500   -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical');
501   height: 200px;
502 }
503 
504 /* PRINT ONLY rules follow */
505 @media print {
506 
507   marquee { -moz-binding: none; }
508 
509   /* XXX this should not be necessary, we should be stopping blinking
510      of any kind in print preview, not just the <blink> element */
511   blink {
512     text-decoration: none;
513   }
514  
515 }