/* 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; block-size: 100%; /* Need this so percentage block-sizes of kids work right */ } /* miscellaneous form elements */ fieldset > legend { -moz-padding-start: 2px; -moz-padding-end: 2px; inline-size: -moz-fit-content; } legend { display: block; } fieldset { display: block; -moz-margin-start: 2px; -moz-margin-end: 2px; padding-block-start: 0.35em; padding-block-end: 0.75em; -moz-padding-start: 0.625em; -moz-padding-end: 0.625em; 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 and padding on block-start and block-end 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-block-start: 1px; margin-block-end: 1px; border: 2px inset ThreeDFace; /* The 1px inline padding is for parity with Win/IE */ -moz-padding-start: 1px; -moz-padding-end: 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 { writing-mode: horizontal-tb !important; /* XXX remove when bug 1112954 is fixed */ 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: find a better solution than forcing direction: ltr on all file input labels and remove this override -- bug 1161482 */ input[type="file"]:-moz-dir(rtl) > xul|label { -moz-padding-start: 0px; -moz-padding-end: 5px; } /* radio buttons */ input[type="radio"] { -moz-appearance: radio; margin-block-start: 3px; margin-block-end: 0px; -moz-margin-start: 5px; -moz-margin-end: 3px; border-radius: 100% !important; } /* check boxes */ input[type="checkbox"] { -moz-appearance: checkbox; margin-block-start: 3px; margin-block-end: 3px; -moz-margin-start: 4px; -moz-margin-end: 3px; 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; inline-size: 13px; block-size: 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 and padding on block-start and block-end must be the same here, for text inputs, and for