/* 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; /* 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 Multicol/Flex/Grid/Align sections below in sync with ::-moz-scrolled-content in ua.css and ::-moz-button-content below. */ /* 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 */ fieldset > legend { inline-size: -moz-fit-content; } 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; } /* 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: 0; padding-inline: 8px; border: 2px outset ThreeDLightShadow; background-color: ButtonFace; cursor: default; box-sizing: border-box; user-select: none; } /* 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; overflow-clip-box: padding-box; } input[type=color] { inline-size: 64px; block-size: 23px; } @media (-moz-non-native-content-theme) { button, ::file-selector-button, input:is([type=reset], [type=button], [type=submit]) { padding-inline: 4px; } input[type=color] { padding: 4px; } } button, ::file-selector-button { /* Buttons should lay out like "normal" html, mostly */ white-space: unset; text-indent: 0; /* But no text-decoration reaching inside, by default */ display: inline-block; } *|*::-moz-button-content { display: block; /* Please keep the Multicol/Flex/Grid/Align sections below in sync with ::-moz-scrolled-content in ua.css and ::-moz-fieldset-content above. */ /* 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 { background-color: -moz-buttonhoverface; } ::file-selector-button:hover, button:hover, input:is([type=reset], [type=button], [type=submit]):hover { color: -moz-buttonhovertext; } ::file-selector-button:active:hover, button:active:hover, input:is([type=reset], [type=button], [type=submit], [type=color]):active:hover { %ifndef XP_MACOSX padding-block: 0; padding-inline: 9px 7px; %endif border-style: inset; background-color: ButtonFace; } ::file-selector-button:active:hover, button:active:hover, input:is([type=reset], [type=button], [type=submit]):active:hover { %ifdef MOZ_WIDGET_GTK color: -moz-gtk-buttonactivetext; %else color: ButtonText; %endif } ::-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; } :-moz-focusring::-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 { /* The sum of border and padding on block-start and block-end must be the same here and for text inputs */ padding-block: 0; padding-inline: 8px; border: 2px outset ThreeDLightShadow; 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; } /* file selector */ input[type=file] { white-space: nowrap !important; overflow: hidden !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; 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: * *