/* 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; /* nsRuleNode::ComputeDisplayData overrules this in some cases */ unicode-bidi: inherit; text-overflow: inherit; overflow: inherit; overflow-clip-box: inherit; /* Need to inherit border-radius too, so when the fieldset has rounded borders we don't leak out the corners for hit-testing purposes. */ border-radius: inherit; padding: inherit; block-size: 100%; /* Need this so percentage block-sizes of kids work right */ /* Please keep the Multicol/Flex/Grid/Align sections below in sync with ::-moz-scrolled-content in ua.css and ::-moz-button-content below. */ /* Multicol container */ -moz-column-count: inherit; -moz-column-width: inherit; -moz-column-gap: inherit; -moz-column-rule: inherit; -moz-column-fill: inherit; /* Flex container */ flex-direction: inherit; flex-wrap: inherit; /* -webkit-box container (aliased from -webkit versions to -moz versions) */ -moz-box-orient: inherit; -moz-box-direction: inherit; -moz-box-pack: inherit; -moz-box-align: inherit; /* Grid container */ grid-auto-columns: inherit; grid-auto-rows: inherit; grid-auto-flow: inherit; grid-column-gap: inherit; grid-row-gap: inherit; grid-template-areas: inherit; grid-template-columns: inherit; grid-template-rows: inherit; /* CSS Align */ align-content: inherit; align-items: inherit; justify-content: inherit; justify-items: inherit; } /* miscellaneous form elements */ fieldset > legend { padding-inline-start: 2px; padding-inline-end: 2px; inline-size: -moz-fit-content; } legend { display: block; } fieldset { display: block; margin-inline-start: 2px; margin-inline-end: 2px; padding-block-start: 0.35em; padding-block-end: 0.75em; padding-inline-start: 0.625em; padding-inline-end: 0.625em; border: 2px groove ThreeDLightShadow; min-width: -moz-min-content; } 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 */ select[size], select[multiple], select[size][multiple] { /* Different alignment and padding for listbox vs combobox */ background-color: -moz-Field; color: -moz-FieldText; vertical-align: text-bottom; padding-block-start: 1px; padding-block-end: 1px; padding-inline-start: 0; padding-inline-end: 0; -moz-appearance: listbox; } select[size="0"], select[size="1"] { /* Except this is not a listbox */ background-color: -moz-Combobox; color: -moz-ComboboxText; vertical-align: baseline; padding: 0; -moz-appearance: menulist; } select > button { inline-size: 12px; white-space: nowrap; position: static !important; background-image: url("arrow.gif") !important; background-repeat: no-repeat !important; background-position: center !important; -moz-appearance: menulist-button; /* Make sure to size correctly if the combobox has a non-auto height. */ block-size: 100% ! important; box-sizing: border-box ! important; /* Make sure to align properly with the display frame. Note that we want the baseline of the combobox to match the baseline of the display frame, so the dropmarker is what gets the vertical-align. */ vertical-align: top !important; } select > button:active { background-image: url("arrowd.gif") !important; } select > button[orientation="left"] { background-image: url("arrow-left.gif") !important; } select > button[orientation="right"] { background-image: url("arrow-right.gif") !important; } select > button[orientation="left"]:active { background-image: url("arrowd-left.gif") !important; } select > button[orientation="right"]:active { background-image: url("arrowd-right.gif") !important; } select:empty { inline-size: 2.5em; } *|*::-moz-display-comboboxcontrol-frame { overflow: -moz-hidden-unscrollable; /* This block-start/end padding plus the combobox block-start/end border need to add up to the block-start/end borderpadding of text inputs and buttons */ padding-block-start: 1px; padding-block-end: 1px; padding-inline-start: 4px; padding-inline-end: 0; color: inherit; white-space: nowrap; text-align: inherit; -moz-user-select: none; /* Make sure to size correctly if the combobox has a non-auto block-size. */ block-size: 100% ! important; box-sizing: border-box ! important; line-height: -moz-block-height; } option { display: block; float: none !important; position: static !important; min-block-size: 1em; line-height: normal !important; -moz-user-select: none; text-indent: 0; white-space: nowrap !important; word-wrap: normal !important; text-align: match-parent; } select > option { padding-block-start : 0; padding-block-end: 0; padding-inline-start: 3px; padding-inline-end: 5px; } option:checked { background-color: -moz-html-cellhighlight !important; color: -moz-html-cellhighlighttext !important; } select:focus > option:checked, select:focus > optgroup > option:checked { background-color: Highlight ! important; color: HighlightText ! important; } optgroup { display: block; float: none !important; position: static !important; font: -moz-list; line-height: normal !important; font-style: italic; font-weight: bold; font-size: inherit; -moz-user-select: none; text-indent: 0; white-space: nowrap !important; word-wrap: normal !important; } optgroup > option { padding-inline-start: 20px; font-style: normal; font-weight: normal; } optgroup:before { display: block; content: attr(label); } *|*::-moz-dropdown-list { z-index: 2147483647; background-color: inherit; -moz-user-select: none; position: static !important; float: none !important; /* * We can't change the padding here, because that would affect our * intrinsic inline-size, since we scroll. But at the same time, we want * to make sure that our inline-start border+padding matches the inline-start * border+padding of a combobox so that our scrollbar will line up * with the dropmarker. So set our inline-start border to 2px. */ border: 1px outset black !important; border-inline-start-width: 2px ! important; } input:disabled, textarea:disabled, option:disabled, optgroup:disabled, select:disabled:disabled /* Need the pseudo-class twice to have the specificity be at least the same as select[size][multiple] above */ { -moz-user-input: disabled; color: GrayText; background-color: ThreeDLightShadow; cursor: inherit; } input:disabled, textarea:disabled { cursor: default; } option:disabled, optgroup:disabled { background-color: transparent; } /* hidden inputs */ input[type="hidden"] { -moz-appearance: none; display: none !important; padding: 0; border: 0; cursor: auto; -moz-user-focus: ignore; -moz-binding: none; } /* image buttons */ input[type="image"] { -moz-appearance: none; padding: 0; border: none; background-color: transparent; font-family: sans-serif; font-size: small; cursor: pointer; -moz-binding: none; } input[type="image"]:disabled { cursor: inherit; } input[type="image"]:-moz-focusring { /* Don't specify the outline-color, we should always use initial value. */ outline: 1px dotted; } /* file selector */ input[type="file"] { display: inline-block; white-space: nowrap; overflow: hidden; overflow-clip-box: padding-box; color: inherit; /* Revert rules which apply on all inputs. */ -moz-appearance: none; -moz-binding: none; cursor: default; border: none; background-color: transparent; padding: 0; } input[type="file"] > xul|label { min-inline-size: 12em; padding-inline-start: 5px; text-align: match-parent; color: inherit; font-size: inherit; letter-spacing: inherit; /* * Force the text to have LTR directionality. Otherwise filenames containing * RTL characters will be reordered with chaotic results. */ direction: ltr !important; } /* button part of file selector */ input[type="file"] > button[type="button"] { block-size: inherit; font-size: inherit; letter-spacing: inherit; cursor: inherit; } /* colored part of the color selector button */ input[type="color"]:-moz-system-metric(color-picker-available)::-moz-color-swatch { width: 100%; height: 100%; min-width: 3px; min-height: 3px; margin-inline-start: auto; margin-inline-end: auto; box-sizing: border-box; border: 1px solid grey; display: block; } /* Try to make RTL 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"]:dir(rtl) > xul|label { padding-inline-start: 0px; padding-inline-end: 5px; } /* radio buttons */ input[type="radio"] { display: inline-block; -moz-appearance: radio; margin-block-start: 3px; margin-block-end: 0px; margin-inline-start: 5px; margin-inline-end: 3px; } /* check boxes */ input[type="checkbox"] { display: inline-block; -moz-appearance: checkbox; margin-block-start: 3px; margin-block-end: 3px; margin-inline-start: 4px; margin-inline-end: 3px; } /* common features of radio buttons and check boxes */ input[type="radio"], input[type="checkbox"] { box-sizing: border-box; cursor: default; /* unset some values from the general 'input' rule above: */ padding: unset; -moz-binding: unset; border: unset; background-color: unset; color: unset; } 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 { cursor: inherit; } % On Mac, the native theme takes care of this. % See nsNativeThemeCocoa::ThemeDrawsFocusForWidget. %ifndef XP_MACOSX input[type="checkbox"]:-moz-focusring, input[type="radio"]:-moz-focusring { /* Don't specify the outline-color, we should always use initial value. */ outline: 1px dotted; } %endif input[type="search"] { box-sizing: border-box; } /* 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