/* 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; overflow-clip-box: 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 and ::-moz-button-content below. */ 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 . Note -moz-focus-inner padding does not affect button size. */ padding-block: 1px; padding-inline: 8px; border: 2px outset ButtonBorder; background-color: ButtonFace; cursor: default; box-sizing: border-box; user-select: none; overflow-clip-box: padding-box; } /* Text-related properties for buttons: these ones are not shared with input[type=color] */ button, ::file-selector-button, input:is([type=reset], [type=button], [type=submit]) { color: ButtonText; font: -moz-button; white-space: pre; text-align: center; padding-inline: 4px; } input[type=color] { inline-size: 64px; block-size: 32px; padding: 4px; } /* https://github.com/whatwg/html/issues/9976 */ input:not([type=image i], [type=range i], [type=checkbox i], [type=radio i]) { overflow: clip !important; overflow-clip-margin: 0px !important; } button, ::file-selector-button { /* Buttons should lay out like "normal" html, mostly */ white-space: unset; /* But no text-decoration reaching inside, by default */ display: inline-block; } *|*::-moz-button-content { display: block; /* Please keep the declarations below in sync with ::-moz-scrolled-content in ua.css and ::-moz-fieldset-content above. */ 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; } ::file-selector-button:hover, button:hover, input:is([type=reset], [type=button], [type=submit], [type=color]):hover { color: -moz-buttonhovertext; background-color: -moz-buttonhoverface; } ::file-selector-button:active:hover, button:active:hover, input:is([type=reset], [type=button], [type=submit], [type=color]):active:hover { border-style: inset; color: -moz-buttonactivetext; background-color: -moz-buttonactiveface; } ::-moz-focus-inner { /* Note this padding only affects the -moz-focus-inner ring, not the button itself */ padding-block: 0; padding-inline: 2px; border: 1px dotted transparent; } :focus-visible::-moz-focus-inner { border-color: currentColor; } :is(:disabled, :disabled:active)::file-selector-button, button:is(:disabled, :disabled:active), input:is([type=reset], [type=button], [type=submit], [type=color]):is(:disabled, :disabled:active), select:is(:disabled, :disabled:active) > button { border-style: outset; cursor: unset; } :is(:disabled, :disabled:active)::file-selector-button, button:is(:disabled, :disabled:active), input:is([type=reset], [type=button], [type=submit]):is(:disabled, :disabled:active), select:is(:disabled, :disabled:active) > button { color: GrayText; background-color: -moz-ButtonDisabledFace; } /* file selector */ input[type=file] { white-space: nowrap !important; overflow-clip-box: padding-box; color: unset; /* Revert rules which apply on all inputs. */ appearance: none; -moz-default-appearance: none; cursor: default; border: none; background-color: transparent; padding: unset; } input[type=file] > label { display: inline-block; min-inline-size: 12em; text-align: match-parent; cursor: unset; color: unset; font-size: unset; letter-spacing: unset; user-select: none; unicode-bidi: plaintext; } /* button part of file selector */ ::file-selector-button { font-size: unset; letter-spacing: unset; cursor: unset; margin-inline-end: 5px; } /* * Make form controls inherit 'unicode-bidi' transparently as required by * their various anonymous descendants and pseudo-elements: * *