/* 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 */ *|*::-moz-fieldset-content { display: block; /* StyleAdjuster::adjust_for_fieldset_content overrides this in some cases */ unicode-bidi: inherit; text-overflow: inherit; overflow: inherit; resize: 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; box-decoration-break: inherit; block-size: 100%; /* Need this so percentage block-sizes of kids work right */ /* Please keep the declarations below in sync with ::-moz-scrolled-content in ua.css. */ content: inherit; /* Multicol container */ column-count: inherit; column-width: inherit; column-gap: inherit; column-rule: inherit; 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 */ legend { display: block; padding-inline: 2px; } fieldset { display: block; margin-inline: 2px; padding-block: 0.35em 0.625em; padding-inline: 0.75em; border: 2px groove ThreeDFace; min-inline-size: min-content; } label { cursor: default; /* If you add declarations here, consider whether the select > label and file * input label need them as well. */ } /* Default inputs, text inputs, and selects */ /* Note: Values in nsNativeTheme IsWidgetStyled function need to match textfield background/border values here */ input { display: inline-block; appearance: auto; -moz-default-appearance: textfield; /* The sum of border and padding on block-start and block-end must be the same here, for buttons, and for as not selectable. */ user-select: none; } /* stylelint-disable-next-line selector-pseudo-element-no-unknown */ select::picker-icon { display: inline-block; appearance: auto; -moz-default-appearance: -moz-menulist-arrow-button; pointer-events: none; -webkit-text-security: none; max-block-size: 100%; /* Make sure to align properly with the display frame. Note that we want the * baseline of the combobox to match the baseline of the label, so the * dropmarker is what gets the vertical-align. */ vertical-align: top; } select:-moz-select-list-box { overflow-inline: hidden; overflow-block: scroll; padding-inline: 0; background-color: Field; color: FieldText; vertical-align: text-bottom; appearance: auto; -moz-default-appearance: listbox; @media (-moz-platform: macos) { scrollbar-width: thin; } } option[label]::before { content: attr(label); } select:-moz-select-list-box option, select:-moz-select-list-box optgroup { line-height: normal !important; } option { display: block; float: none !important; position: static !important; /* This makes sure that it is a containing block for positioned descendants. */ will-change: -moz-fixed-pos-containing-block !important; min-block-size: 1em; min-inline-size: min-content; padding-block: 2px; user-select: none; /* * 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. */ white-space: nowrap !important; word-wrap: normal !important; } option:read-write { user-select: text; } select > option { padding-inline: 4px; } select:-moz-select-list-box option:checked { background-color: -moz-cellhighlight; color: -moz-cellhighlighttext; } select:-moz-select-list-box:focus option:checked { background-color: SelectedItem !important; color: SelectedItemText !important; } optgroup { display: block; float: none !important; position: static !important; font-style: italic; font-weight: bold; font-size: unset; user-select: none; 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: "\200b" attr(label); } @media (-moz-platform: android) { /* These elements are handled by the prompt module. */ select option, select optgroup { pointer-events: none; } } input:disabled, textarea:disabled, option:disabled, optgroup:disabled, select:disabled { color: GrayText; background-color: -moz-DisabledField; cursor: unset; } input:disabled, textarea:disabled { cursor: default; } option:disabled, optgroup:disabled { background-color: transparent; } /* hidden inputs */ input[type="hidden"] { appearance: none; -moz-default-appearance: none; display: none !important; padding: unset; border: 0; cursor: auto; -moz-user-focus: ignore; } /* image buttons */ input:where([type="image"]) { appearance: none; -moz-default-appearance: none; padding: unset; border: none; background-color: transparent; font-family: sans-serif; font-size: small; cursor: pointer; } input:where([type="image"]):disabled { cursor: unset; } /* colored part of the color selector button */ ::-moz-color-swatch { width: 100%; height: 100%; min-width: 3px; min-height: 3px; margin-inline: auto; box-sizing: border-box; border: 1px solid grey; display: block; background-image: linear-gradient(currentColor), repeating-conic-gradient(#ccc 0 25%, white 0 50%); background-size: 12px 12px; /* Make sure that the background color is properly set in High Contrast Mode */ forced-color-adjust: none; } /* radio buttons */ input[type="radio"] { appearance: auto; -moz-default-appearance: radio; margin-block: 3px 0; margin-inline: 5px 3px; } /* check boxes */ input[type="checkbox"] { appearance: auto; -moz-default-appearance: checkbox; margin-block: 3px; margin-inline: 4px 3px; } /* Common features of radio buttons and check boxes */ input:where([type="radio"], [type="checkbox"]) { box-sizing: border-box; cursor: default; /* unset some values from the general 'input' rule above: */ padding: unset; border: unset; background-color: unset; color: unset; } input:where([type="radio"], [type="checkbox"]):is(:disabled, :disabled:active, :disabled:hover:active) { cursor: unset; } 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, ::file-selector-button, input:where([type="color"], [type="reset"], [type="button"], [type="submit"]) { appearance: auto; -moz-default-appearance: button; /* The sum of border and padding on block-start and block-end must be the same here, for text inputs, and for