michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ michael@0: @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); michael@0: michael@0: /* bidi */ michael@0: michael@0: [dir="rtl"] { michael@0: direction: rtl; michael@0: unicode-bidi: embed; michael@0: } michael@0: [dir="ltr"] { michael@0: direction: ltr; michael@0: unicode-bidi: embed; michael@0: } michael@0: michael@0: bdi:-moz-dir(ltr), [dir="auto"]:-moz-dir(ltr) { direction: ltr; } michael@0: bdi:-moz-dir(rtl), [dir="auto"]:-moz-dir(rtl) { direction: rtl; } michael@0: michael@0: /* To ensure http://www.w3.org/TR/REC-html40/struct/dirlang.html#style-bidi: michael@0: * michael@0: * "When a block element that does not have a dir attribute is transformed to michael@0: * the style of an inline element by a style sheet, the resulting presentation michael@0: * should be equivalent, in terms of bidirectional formatting, to the michael@0: * formatting obtained by explicitly adding a dir attribute (assigned the michael@0: * inherited value) to the transformed element." michael@0: * michael@0: * and the rules in http://dev.w3.org/html5/spec/rendering.html#rendering michael@0: */ michael@0: michael@0: address, address[dir], michael@0: article, article[dir], michael@0: aside, aside[dir], michael@0: blockquote, blockquote[dir], michael@0: body, body[dir], michael@0: caption, caption[dir], michael@0: center, center[dir], michael@0: col, col[dir], michael@0: colgroup, colgroup[dir], michael@0: dd, dd[dir], michael@0: dir, dir[dir], michael@0: div, div[dir], michael@0: dl, dl[dir], michael@0: dt, dt[dir], michael@0: fieldset, fieldset[dir], michael@0: figcaption, figcaption[dir], michael@0: figure, figure[dir], michael@0: footer, footer[dir], michael@0: form, form[dir], michael@0: h1, h1[dir], michael@0: h2, h2[dir], michael@0: h3, h3[dir], michael@0: h4, h4[dir], michael@0: h5, h5[dir], michael@0: h6, h6[dir], michael@0: header, header[dir], michael@0: hgroup, hgroup[dir], michael@0: hr, hr[dir], michael@0: html, html[dir], michael@0: legend, legend[dir], michael@0: li, li[dir], michael@0: listing, listing[dir], michael@0: main, main[dir], michael@0: marquee, marquee[dir], michael@0: menu, menu[dir], michael@0: nav, nav[dir], michael@0: noframes, noframes[dir], michael@0: ol, ol[dir], michael@0: p, p[dir], michael@0: plaintext, plaintext[dir], michael@0: pre, pre[dir], michael@0: section, section[dir], michael@0: summary, summary[dir], michael@0: table, table[dir], michael@0: tbody, tbody[dir], michael@0: td, td[dir], michael@0: tfoot, tfoot[dir], michael@0: th, th[dir], michael@0: thead, thead[dir], michael@0: tr, tr[dir], michael@0: ul, ul[dir], michael@0: xmp, xmp[dir] { michael@0: unicode-bidi: -moz-isolate; michael@0: } michael@0: michael@0: bdi, bdi[dir], output, output[dir], [dir="auto"] { michael@0: unicode-bidi: -moz-isolate; michael@0: } michael@0: bdo, bdo[dir] { michael@0: unicode-bidi: bidi-override; michael@0: } michael@0: bdo[dir="auto"] { michael@0: unicode-bidi: -moz-isolate-override; michael@0: } michael@0: textarea[dir="auto"], pre[dir="auto"] { unicode-bidi: -moz-plaintext; } michael@0: michael@0: /* blocks */ michael@0: michael@0: article, michael@0: aside, michael@0: div, michael@0: dt, michael@0: figcaption, michael@0: footer, michael@0: form, michael@0: header, michael@0: hgroup, michael@0: html, michael@0: main, michael@0: nav, michael@0: section { michael@0: display: block; michael@0: } michael@0: michael@0: body { michael@0: display: block; michael@0: margin: 8px; michael@0: } michael@0: michael@0: p, dl, multicol { michael@0: display: block; michael@0: margin: 1em 0; michael@0: } michael@0: michael@0: dd { michael@0: display: block; michael@0: -moz-margin-start: 40px; michael@0: } michael@0: michael@0: blockquote, figure { michael@0: display: block; michael@0: margin: 1em 40px; michael@0: } michael@0: michael@0: address { michael@0: display: block; michael@0: font-style: italic; michael@0: } michael@0: michael@0: center { michael@0: display: block; michael@0: text-align: -moz-center; michael@0: } michael@0: michael@0: blockquote[type=cite] { michael@0: display: block; michael@0: margin: 1em 0px; michael@0: -moz-padding-start: 1em; michael@0: -moz-border-start: solid; michael@0: border-color: blue; michael@0: border-width: thin; michael@0: } michael@0: michael@0: span[_moz_quote=true] { michael@0: color: blue; michael@0: } michael@0: michael@0: pre[_moz_quote=true] { michael@0: color: blue; michael@0: } michael@0: michael@0: h1 { michael@0: display: block; michael@0: font-size: 2em; michael@0: font-weight: bold; michael@0: margin: .67em 0; michael@0: } michael@0: michael@0: h2, michael@0: :-moz-any(article, aside, nav, section) michael@0: h1 { michael@0: display: block; michael@0: font-size: 1.5em; michael@0: font-weight: bold; michael@0: margin: .83em 0; michael@0: } michael@0: michael@0: h3, michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: h1 { michael@0: display: block; michael@0: font-size: 1.17em; michael@0: font-weight: bold; michael@0: margin: 1em 0; michael@0: } michael@0: michael@0: h4, michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: h1 { michael@0: display: block; michael@0: font-size: 1.00em; michael@0: font-weight: bold; michael@0: margin: 1.33em 0; michael@0: } michael@0: michael@0: h5, michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: h1 { michael@0: display: block; michael@0: font-size: 0.83em; michael@0: font-weight: bold; michael@0: margin: 1.67em 0; michael@0: } michael@0: michael@0: h6, michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: :-moz-any(article, aside, nav, section) michael@0: h1 { michael@0: display: block; michael@0: font-size: 0.67em; michael@0: font-weight: bold; michael@0: margin: 2.33em 0; michael@0: } michael@0: michael@0: listing { michael@0: display: block; michael@0: font-family: -moz-fixed; michael@0: font-size: medium; michael@0: white-space: pre; michael@0: margin: 1em 0; michael@0: } michael@0: michael@0: xmp, pre, plaintext { michael@0: display: block; michael@0: font-family: -moz-fixed; michael@0: white-space: pre; michael@0: margin: 1em 0; michael@0: } michael@0: michael@0: /* tables */ michael@0: michael@0: table { michael@0: display: table; michael@0: border-spacing: 2px; michael@0: border-collapse: separate; michael@0: margin-top: 0; michael@0: margin-bottom: 0; michael@0: /* XXXldb do we want this if we're border-collapse:collapse ? */ michael@0: box-sizing: border-box; michael@0: text-indent: 0; michael@0: } michael@0: michael@0: table[align="left"] { michael@0: float: left; michael@0: } michael@0: michael@0: table[align="right"] { michael@0: float: right; michael@0: text-align: start; michael@0: } michael@0: michael@0: michael@0: /* border collapse rules */ michael@0: michael@0: /* Set hidden if we have 'frame' or 'rules' attribute. michael@0: Set it on all sides when we do so there's more consistency michael@0: in what authors should expect */ michael@0: michael@0: /* Put this first so 'border' and 'frame' rules can override it. */ michael@0: table[rules] { michael@0: border-width: thin; michael@0: border-style: hidden; michael@0: } michael@0: michael@0: /* 'border' before 'frame' so 'frame' overrides michael@0: A border with a given value should, of course, pass that value michael@0: as the border-width in pixels -> attr mapping */ michael@0: michael@0: /* :-moz-table-border-nonzero is like [border]:not([border="0"]) except it michael@0: also checks for other zero-like values according to HTML attribute michael@0: parsing rules */ michael@0: table:-moz-table-border-nonzero { michael@0: border-width: thin; michael@0: border-style: outset; michael@0: } michael@0: michael@0: table[frame] { michael@0: border: thin hidden; michael@0: } michael@0: michael@0: /* specificity must beat table:-moz-table-border-nonzero rule above */ michael@0: table[frame="void"] { border-style: hidden; } michael@0: table[frame="above"] { border-style: outset hidden hidden hidden; } michael@0: table[frame="below"] { border-style: hidden hidden outset hidden; } michael@0: table[frame="lhs"] { border-style: hidden hidden hidden outset; } michael@0: table[frame="rhs"] { border-style: hidden outset hidden hidden; } michael@0: table[frame="hsides"] { border-style: outset hidden; } michael@0: table[frame="vsides"] { border-style: hidden outset; } michael@0: table[frame="box"], michael@0: table[frame="border"] { border-style: outset; } michael@0: michael@0: michael@0: /* Internal Table Borders */ michael@0: michael@0: /* 'border' cell borders first */ michael@0: michael@0: table:-moz-table-border-nonzero > * > tr > td, michael@0: table:-moz-table-border-nonzero > * > tr > th, michael@0: table:-moz-table-border-nonzero > * > td, michael@0: table:-moz-table-border-nonzero > * > th, michael@0: table:-moz-table-border-nonzero > td, michael@0: table:-moz-table-border-nonzero > th michael@0: { michael@0: border-width: thin; michael@0: border-style: inset; michael@0: } michael@0: michael@0: /* collapse only if rules are really specified */ michael@0: table[rules]:not([rules="none"]):not([rules=""]) { michael@0: border-collapse: collapse; michael@0: } michael@0: michael@0: /* only specified rules override 'border' settings michael@0: (increased specificity to achieve this) */ michael@0: table[rules]:not([rules=""])> tr > td, michael@0: table[rules]:not([rules=""])> * > tr > td, michael@0: table[rules]:not([rules=""])> tr > th, michael@0: table[rules]:not([rules=""])> * > tr > th, michael@0: table[rules]:not([rules=""])> td, michael@0: table[rules]:not([rules=""])> th michael@0: { michael@0: border-width: thin; michael@0: border-style: none; michael@0: } michael@0: michael@0: michael@0: table[rules][rules="none"] > tr > td, michael@0: table[rules][rules="none"] > * > tr > td, michael@0: table[rules][rules="none"] > tr > th, michael@0: table[rules][rules="none"] > * > tr > th, michael@0: table[rules][rules="none"] > td, michael@0: table[rules][rules="none"] > th michael@0: { michael@0: border-width: thin; michael@0: border-style: none; michael@0: } michael@0: michael@0: table[rules][rules="all"] > tr > td, michael@0: table[rules][rules="all"] > * > tr > td, michael@0: table[rules][rules="all"] > tr > th, michael@0: table[rules][rules="all"] > * > tr > th, michael@0: table[rules][rules="all"] > td, michael@0: table[rules][rules="all"] > th michael@0: { michael@0: border-width: thin; michael@0: border-style: solid; michael@0: } michael@0: michael@0: table[rules][rules="rows"] > tr, michael@0: table[rules][rules="rows"] > * > tr { michael@0: border-top-width: thin; michael@0: border-bottom-width: thin; michael@0: border-top-style: solid; michael@0: border-bottom-style: solid; michael@0: } michael@0: michael@0: michael@0: table[rules][rules="cols"] > tr > td, michael@0: table[rules][rules="cols"] > * > tr > td, michael@0: table[rules][rules="cols"] > tr > th, michael@0: table[rules][rules="cols"] > * > tr > th { michael@0: border-left-width: thin; michael@0: border-right-width: thin; michael@0: border-left-style: solid; michael@0: border-right-style: solid; michael@0: } michael@0: michael@0: table[rules][rules="groups"] > colgroup { michael@0: border-left-width: thin; michael@0: border-right-width: thin; michael@0: border-left-style: solid; michael@0: border-right-style: solid; michael@0: } michael@0: table[rules][rules="groups"] > tfoot, michael@0: table[rules][rules="groups"] > thead, michael@0: table[rules][rules="groups"] > tbody { michael@0: border-top-width: thin; michael@0: border-bottom-width: thin; michael@0: border-top-style: solid; michael@0: border-bottom-style: solid; michael@0: } michael@0: michael@0: michael@0: /* caption inherits from table not table-outer */ michael@0: caption { michael@0: display: table-caption; michael@0: text-align: center; michael@0: } michael@0: michael@0: table[align="center"] > caption { michael@0: margin-left: auto; michael@0: margin-right: auto; michael@0: } michael@0: michael@0: table[align="center"] > caption[align="left"] { michael@0: margin-right: 0; michael@0: } michael@0: michael@0: table[align="center"] > caption[align="right"] { michael@0: margin-left: 0; michael@0: } michael@0: michael@0: tr { michael@0: display: table-row; michael@0: vertical-align: inherit; michael@0: } michael@0: michael@0: col { michael@0: display: table-column; michael@0: } michael@0: michael@0: colgroup { michael@0: display: table-column-group; michael@0: } michael@0: michael@0: tbody { michael@0: display: table-row-group; michael@0: vertical-align: middle; michael@0: } michael@0: michael@0: thead { michael@0: display: table-header-group; michael@0: vertical-align: middle; michael@0: } michael@0: michael@0: tfoot { michael@0: display: table-footer-group; michael@0: vertical-align: middle; michael@0: } michael@0: michael@0: /* for XHTML tables without tbody */ michael@0: table > tr { michael@0: vertical-align: middle; michael@0: } michael@0: michael@0: td { michael@0: display: table-cell; michael@0: vertical-align: inherit; michael@0: text-align: inherit; michael@0: padding: 1px; michael@0: } michael@0: michael@0: th { michael@0: display: table-cell; michael@0: vertical-align: inherit; michael@0: font-weight: bold; michael@0: padding: 1px; michael@0: } michael@0: michael@0: tr > form:-moz-is-html, tbody > form:-moz-is-html, michael@0: thead > form:-moz-is-html, tfoot > form:-moz-is-html, michael@0: table > form:-moz-is-html { michael@0: /* Important: don't show these forms in HTML */ michael@0: display: none !important; michael@0: } michael@0: michael@0: table[bordercolor] > tbody, michael@0: table[bordercolor] > thead, michael@0: table[bordercolor] > tfoot, michael@0: table[bordercolor] > col, michael@0: table[bordercolor] > colgroup, michael@0: table[bordercolor] > tr, michael@0: table[bordercolor] > * > tr, michael@0: table[bordercolor] > tr > td, michael@0: table[bordercolor] > * > tr > td, michael@0: table[bordercolor] > tr > th, michael@0: table[bordercolor] > * > tr > th { michael@0: border-color: inherit; michael@0: } michael@0: michael@0: /* inlines */ michael@0: michael@0: q:before { michael@0: content: open-quote; michael@0: } michael@0: michael@0: q:after { michael@0: content: close-quote; michael@0: } michael@0: michael@0: b, strong { michael@0: font-weight: bolder; michael@0: } michael@0: michael@0: i, cite, em, var, dfn { michael@0: font-style: italic; michael@0: } michael@0: michael@0: tt, code, kbd, samp { michael@0: font-family: -moz-fixed; michael@0: } michael@0: michael@0: u, ins { michael@0: text-decoration: underline; michael@0: } michael@0: michael@0: s, strike, del { michael@0: text-decoration: line-through; michael@0: } michael@0: michael@0: big { michael@0: font-size: larger; michael@0: } michael@0: michael@0: small { michael@0: font-size: smaller; michael@0: } michael@0: michael@0: sub { michael@0: vertical-align: sub; michael@0: font-size: smaller; michael@0: line-height: normal; michael@0: } michael@0: michael@0: sup { michael@0: vertical-align: super; michael@0: font-size: smaller; michael@0: line-height: normal; michael@0: } michael@0: michael@0: nobr { michael@0: white-space: nowrap; michael@0: } michael@0: michael@0: mark { michael@0: background: yellow; michael@0: color: black; michael@0: } michael@0: michael@0: /* titles */ michael@0: abbr[title], acronym[title] { michael@0: border-bottom: dotted 1px; michael@0: } michael@0: michael@0: /* lists */ michael@0: michael@0: ul, menu, dir { michael@0: display: block; michael@0: list-style-type: disc; michael@0: margin: 1em 0; michael@0: -moz-padding-start: 40px; michael@0: } michael@0: michael@0: menu[type="context"] { michael@0: display: none !important; michael@0: } michael@0: michael@0: ol { michael@0: display: block; michael@0: list-style-type: decimal; michael@0: margin: 1em 0; michael@0: -moz-padding-start: 40px; michael@0: } michael@0: michael@0: li { michael@0: display: list-item; michael@0: } michael@0: michael@0: /* nested lists have no top/bottom margins */ michael@0: :-moz-any(ul, ol, dir, menu, dl) ul, michael@0: :-moz-any(ul, ol, dir, menu, dl) ol, michael@0: :-moz-any(ul, ol, dir, menu, dl) dir, michael@0: :-moz-any(ul, ol, dir, menu, dl) menu, michael@0: :-moz-any(ul, ol, dir, menu, dl) dl { michael@0: margin-top: 0; michael@0: margin-bottom: 0; michael@0: } michael@0: michael@0: /* 2 deep unordered lists use a circle */ michael@0: :-moz-any(ol, ul, menu, dir) ul, michael@0: :-moz-any(ol, ul, menu, dir) menu, michael@0: :-moz-any(ol, ul, menu, dir) dir { michael@0: list-style-type: circle; michael@0: } michael@0: michael@0: /* 3 deep (or more) unordered lists use a square */ michael@0: :-moz-any(ol, ul, menu, dir) :-moz-any(ol, ul, menu, dir) ul, michael@0: :-moz-any(ol, ul, menu, dir) :-moz-any(ol, ul, menu, dir) menu, michael@0: :-moz-any(ol, ul, menu, dir) :-moz-any(ol, ul, menu, dir) dir { michael@0: list-style-type: square; michael@0: } michael@0: michael@0: michael@0: /* leafs */ michael@0: michael@0: /*
noshade and color attributes are handled completely by michael@0: * the nsHTMLHRElement attribute mapping code michael@0: */ michael@0: hr { michael@0: display: block; michael@0: height: 2px; michael@0: border: 1px inset; michael@0: margin: 0.5em auto 0.5em auto; michael@0: color: gray; michael@0: -moz-float-edge: margin-box; michael@0: box-sizing: border-box; michael@0: } michael@0: michael@0: hr[size="1"] { michael@0: border-style: solid none none none; michael@0: } michael@0: michael@0: img:-moz-broken::before, input:-moz-broken::before, michael@0: img:-moz-user-disabled::before, input:-moz-user-disabled::before, michael@0: img:-moz-loading::before, input:-moz-loading::before, michael@0: applet:-moz-empty-except-children-with-localname(param):-moz-broken::before, michael@0: applet:-moz-empty-except-children-with-localname(param):-moz-user-disabled::before { michael@0: content: -moz-alt-content !important; michael@0: unicode-bidi: -moz-isolate; michael@0: } michael@0: michael@0: :-moz-any(object,applet):-moz-any(:-moz-broken,:-moz-user-disabled) > *|* { michael@0: /* michael@0: Inherit in the object's alignment so that if we aren't aligned explicitly michael@0: we'll end up in the right place vertically. See bug 36997. Note that this michael@0: is not !important because we _might_ be aligned explicitly. michael@0: */ michael@0: vertical-align: inherit; michael@0: } michael@0: michael@0: img:-moz-suppressed, input:-moz-suppressed, object:-moz-suppressed, michael@0: embed:-moz-suppressed, applet:-moz-suppressed { michael@0: /* michael@0: Set visibility too in case the page changes display. Note that we _may_ michael@0: want to just set visibility and not display, in general, if we find that michael@0: display:none breaks too many layouts. And if we decide we really do want michael@0: people to be able to right-click blocked images, etc, we need to set michael@0: neither one, and hack the painting code.... :( michael@0: */ michael@0: display: none !important; michael@0: visibility: hidden !important; michael@0: } michael@0: michael@0: img[usemap], object[usemap] { michael@0: color: blue; michael@0: } michael@0: michael@0: frameset { michael@0: display: block ! important; michael@0: overflow: -moz-hidden-unscrollable; michael@0: position: static ! important; michael@0: float: none ! important; michael@0: border: none ! important; michael@0: } michael@0: michael@0: link { michael@0: display: none; michael@0: } michael@0: michael@0: frame { michael@0: border-radius: 0 ! important; michael@0: } michael@0: michael@0: iframe { michael@0: border: 2px inset; michael@0: } michael@0: michael@0: noframes { michael@0: display: none; michael@0: } michael@0: michael@0: spacer { michael@0: position: static ! important; michael@0: float: none ! important; michael@0: } michael@0: michael@0: canvas { michael@0: -moz-user-select: none; michael@0: } michael@0: michael@0: /* focusable content: anything w/ tabindex >=0 is focusable, but we michael@0: skip drawing a focus outline on a few things that handle it michael@0: themselves. */ michael@0: :-moz-focusring:not(input):not(button):not(select):not(textarea):not(iframe):not(frame):not(body):not(html) { michael@0: /* Don't specify the outline-color, we should always use initial value. */ michael@0: outline: 1px dotted; michael@0: } michael@0: michael@0: /* hidden elements */ michael@0: base, basefont, datalist, head, meta, script, style, title, michael@0: noembed, param, template { michael@0: display: none; michael@0: } michael@0: michael@0: area { michael@0: /* Don't give it frames other than its imageframe */ michael@0: display: none ! important; michael@0: } michael@0: michael@0: iframe:-moz-full-screen { michael@0: /* iframes in full-screen mode don't show a border. */ michael@0: border: none; michael@0: } michael@0: michael@0: /* media elements */ michael@0: video > xul|videocontrols, audio > xul|videocontrols { michael@0: display: -moz-box; michael@0: -moz-box-orient: vertical; michael@0: -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#videoControls"); michael@0: } michael@0: michael@0: video:not([controls]) > xul|videocontrols, michael@0: audio:not([controls]) > xul|videocontrols { michael@0: visibility: hidden; michael@0: -moz-binding: none; michael@0: } michael@0: michael@0: audio:not([controls]) { michael@0: display: none; michael@0: } michael@0: michael@0: *|*::-moz-html-canvas-content { michael@0: display: block !important; michael@0: /* we want to be an absolute and fixed container */ michael@0: -moz-transform: translate(0) !important; michael@0: } michael@0: michael@0: video > .caption-box { michael@0: position: relative; michael@0: overflow: hidden; michael@0: } michael@0: michael@0: /* emulation of non-standard HTML tag */ michael@0: marquee { michael@0: width: -moz-available; michael@0: display: inline-block; michael@0: vertical-align: text-bottom; michael@0: text-align: start; michael@0: -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal'); michael@0: } michael@0: michael@0: marquee[direction="up"], marquee[direction="down"] { michael@0: -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical'); michael@0: height: 200px; michael@0: } michael@0: michael@0: /* PRINT ONLY rules follow */ michael@0: @media print { michael@0: michael@0: marquee { -moz-binding: none; } michael@0: michael@0: }