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: /** michael@0: Styles for old GFX form widgets michael@0: **/ michael@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: *|*::-moz-fieldset-content { michael@0: display: block; michael@0: unicode-bidi: inherit; michael@0: text-overflow: inherit; michael@0: overflow: inherit; michael@0: padding: inherit; michael@0: height: 100%; /* Need this so percentage heights of kids work right */ michael@0: } michael@0: michael@0: /* miscellaneous form elements */ michael@0: michael@0: fieldset > legend { michael@0: padding-left: 2px; michael@0: padding-right: 2px; michael@0: width: -moz-fit-content; michael@0: } michael@0: michael@0: legend { michael@0: display: block; michael@0: } michael@0: michael@0: fieldset { michael@0: display: block; michael@0: margin-left: 2px; michael@0: margin-right: 2px; michael@0: padding: 0.35em 0.625em 0.75em; michael@0: border: 2px groove ThreeDFace; michael@0: } michael@0: michael@0: label { michael@0: cursor: default; michael@0: } michael@0: michael@0: /* default inputs, text inputs, and selects */ michael@0: michael@0: /* Note: Values in nsNativeTheme IsWidgetStyled function michael@0: need to match textfield background/border values here */ michael@0: michael@0: input { michael@0: -moz-appearance: textfield; michael@0: /* The sum of border-top, border-bottom, padding-top, padding-bottom michael@0: must be the same here, for buttons, and for ). */ michael@0: input.uri-element-right-align[dir=ltr]:-moz-locale-dir(rtl) { michael@0: text-align: left !important; michael@0: } michael@0: } michael@0: michael@0: textarea { michael@0: margin: 1px 0 1px 0; michael@0: border: 2px inset ThreeDFace; michael@0: /* The 1px horizontal padding is for parity with Win/IE */ michael@0: padding: 0px 1px; michael@0: background-color: -moz-Field; michael@0: color: -moz-FieldText; michael@0: font: medium -moz-fixed; michael@0: text-rendering: optimizeLegibility; michael@0: text-align: start; michael@0: text-transform: none; michael@0: word-spacing: normal; michael@0: letter-spacing: normal; michael@0: vertical-align: text-bottom; michael@0: cursor: text; michael@0: resize: both; michael@0: -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas"); michael@0: -moz-appearance: textfield-multiline; michael@0: text-indent: 0; michael@0: -moz-user-select: text; michael@0: text-shadow: none; michael@0: word-wrap: break-word; michael@0: overflow-clip-box: content-box; michael@0: } michael@0: michael@0: textarea > scrollbar { michael@0: cursor: default; michael@0: } michael@0: michael@0: textarea > .anonymous-div, michael@0: input > .anonymous-div, michael@0: input::-moz-placeholder, michael@0: textarea::-moz-placeholder { michael@0: white-space: pre; michael@0: overflow: auto; michael@0: border: 0px !important; michael@0: padding: inherit !important; michael@0: margin: 0px; michael@0: text-decoration: inherit; michael@0: -moz-text-decoration-color: inherit; michael@0: -moz-text-decoration-style: inherit; michael@0: display: inline-block; michael@0: ime-mode: inherit; michael@0: resize: inherit; michael@0: -moz-control-character-visibility: visible; michael@0: overflow-clip-box: inherit; michael@0: } michael@0: michael@0: textarea > .anonymous-div.wrap, michael@0: input > .anonymous-div.wrap { michael@0: white-space: pre-wrap; michael@0: } michael@0: textarea > .anonymous-div.inherit-overflow, michael@0: input > .anonymous-div.inherit-overflow { michael@0: overflow: inherit; michael@0: } michael@0: michael@0: input::-moz-placeholder, michael@0: textarea::-moz-placeholder { michael@0: /* michael@0: * Changing display to inline can leads to broken behaviour and will assert. michael@0: */ michael@0: display: inline-block !important; michael@0: michael@0: /* michael@0: * Changing resize would display a broken behaviour and will assert. michael@0: */ michael@0: resize: none !important; michael@0: michael@0: overflow: hidden !important; michael@0: michael@0: /* michael@0: * The placeholder should be ignored by pointer otherwise, we might have some michael@0: * unexpected behavior like the resize handle not being selectable. michael@0: */ michael@0: pointer-events: none !important; michael@0: michael@0: opacity: 0.54; michael@0: } michael@0: michael@0: textarea::-moz-placeholder { michael@0: white-space: pre-wrap !important; michael@0: } michael@0: michael@0: input:-moz-read-write, michael@0: textarea:-moz-read-write { michael@0: -moz-user-modify: read-write !important; michael@0: } michael@0: michael@0: select { michael@0: margin: 0; michael@0: border-color: ThreeDFace; michael@0: background-color: -moz-Combobox; michael@0: color: -moz-ComboboxText; michael@0: font: -moz-list; michael@0: /* michael@0: * Note that the "UA !important" tests in michael@0: * layout/style/test/test_animations.html depend on this rule, because michael@0: * they need some UA !important rule to test. If this changes, use a michael@0: * different one there. michael@0: */ michael@0: line-height: normal !important; michael@0: white-space: nowrap !important; michael@0: word-wrap: normal !important; michael@0: text-align: start; michael@0: cursor: default; michael@0: box-sizing: border-box; michael@0: -moz-user-select: none; michael@0: -moz-appearance: menulist; michael@0: border-width: 2px; michael@0: border-style: inset; michael@0: text-indent: 0; michael@0: overflow: -moz-hidden-unscrollable; michael@0: text-shadow: none; michael@0: /* No text-decoration reaching inside, by default */ michael@0: display: inline-block; michael@0: page-break-inside: avoid; michael@0: overflow-clip-box: padding-box !important; /* bug 992447 */ michael@0: } michael@0: michael@0: /* Need the "select[size][multiple]" selector to override the settings on michael@0: 'select[size="1"]', eg if one has look nicer. */ michael@0: /* TODO: use text-align: match-parent when bug 645642 is fixed. */ michael@0: input[type="file"]:-moz-dir(rtl) > xul|label { michael@0: -moz-padding-start: 0px; michael@0: padding-right: 5px; michael@0: text-align: right; michael@0: } michael@0: michael@0: /* radio buttons */ michael@0: input[type="radio"] { michael@0: -moz-appearance: radio; michael@0: margin: 3px 3px 0px 5px; michael@0: border-radius: 100% !important; michael@0: } michael@0: michael@0: /* check boxes */ michael@0: input[type="checkbox"] { michael@0: -moz-appearance: checkbox; michael@0: margin: 3px 3px 3px 4px; michael@0: border-radius: 0 !important; michael@0: } michael@0: michael@0: /* common features of radio buttons and check boxes */ michael@0: michael@0: /* NOTE: The width, height, border-width, and padding here must all michael@0: add up the way nsFormControlFrame::GetIntrinsic(Width|Height) michael@0: expects them to, or they will not come out with total width equal michael@0: to total height on sites that set their 'width' or 'height' to 'auto'. michael@0: (Should we maybe set !important on width and height, then?) */ michael@0: input[type="radio"], michael@0: input[type="checkbox"] { michael@0: box-sizing: border-box; michael@0: width: 13px; michael@0: height: 13px; michael@0: cursor: default; michael@0: padding: 0 !important; michael@0: -moz-binding: none; michael@0: /* same colors as |input| rule, but |!important| this time. */ michael@0: background-color: -moz-Field ! important; michael@0: color: -moz-FieldText ! important; michael@0: border: 2px inset ThreeDFace ! important; michael@0: } michael@0: michael@0: input[type="radio"]:disabled, michael@0: input[type="radio"]:disabled:active, michael@0: input[type="radio"]:disabled:hover, michael@0: input[type="radio"]:disabled:hover:active, michael@0: input[type="checkbox"]:disabled, michael@0: input[type="checkbox"]:disabled:active, michael@0: input[type="checkbox"]:disabled:hover, michael@0: input[type="checkbox"]:disabled:hover:active { michael@0: padding: 1px; michael@0: border: 1px inset ThreeDShadow ! important; michael@0: /* same as above, but !important */ michael@0: color: GrayText ! important; michael@0: background-color: ThreeDFace ! important; michael@0: cursor: inherit; michael@0: } michael@0: michael@0: input[type="checkbox"]:-moz-focusring, michael@0: input[type="radio"]:-moz-focusring { michael@0: border-style: groove !important; michael@0: } michael@0: michael@0: input[type="checkbox"]:hover:active, michael@0: input[type="radio"]:hover:active { michael@0: background-color: ThreeDFace ! important; michael@0: border-style: inset !important; michael@0: } michael@0: michael@0: /* buttons */ michael@0: michael@0: /* Note: Values in nsNativeTheme IsWidgetStyled function michael@0: need to match button background/border values here */ michael@0: michael@0: /* Non text-related properties for buttons: these ones are shared with michael@0: input[type="color"] */ michael@0: button, michael@0: input[type="color"]:-moz-system-metric(color-picker-available), michael@0: input[type="reset"], michael@0: input[type="button"], michael@0: input[type="submit"] { michael@0: -moz-appearance: button; michael@0: /* The sum of border-top, border-bottom, padding-top, padding-bottom michael@0: must be the same here, for text inputs, and for