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