Bug 1885580 - Add a MenuGroup component for the menu redesign r=android-reviewers,007
[gecko.git] / layout / style / res / forms.css
bloba2d026639b3d489db281942884da731831b7bb77
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /**
6 Styles for old GFX form widgets
7 **/
10 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
12 *|*::-moz-fieldset-content {
13 display: block; /* StyleAdjuster::adjust_for_fieldset_content overrides this in some cases */
14 unicode-bidi: inherit;
15 text-overflow: inherit;
16 overflow: inherit;
17 overflow-clip-box: inherit;
18 resize: inherit;
19 /* Need to inherit border-radius too, so when the fieldset has rounded
20 borders we don't leak out the corners for hit-testing purposes. */
21 border-radius: inherit;
22 padding: inherit;
23 box-decoration-break: inherit;
24 block-size: 100%; /* Need this so percentage block-sizes of kids work right */
25 /* Please keep the declarations below in sync with ::-moz-scrolled-content in
26 ua.css and ::-moz-button-content below. */
27 content: inherit;
28 /* Multicol container */
29 column-count: inherit;
30 column-width: inherit;
31 column-gap: inherit;
32 column-rule: inherit;
33 column-fill: inherit;
34 /* Flex container */
35 flex-direction: inherit;
36 flex-wrap: inherit;
37 /* -webkit-box container (aliased from -webkit versions to -moz versions) */
38 -moz-box-orient: inherit;
39 -moz-box-direction: inherit;
40 -moz-box-pack: inherit;
41 -moz-box-align: inherit;
42 /* Grid container */
43 grid-auto-columns: inherit;
44 grid-auto-rows: inherit;
45 grid-auto-flow: inherit;
46 grid-column-gap: inherit;
47 grid-row-gap: inherit;
48 grid-template-areas: inherit;
49 grid-template-columns: inherit;
50 grid-template-rows: inherit;
51 /* CSS Align */
52 align-content: inherit;
53 align-items: inherit;
54 justify-content: inherit;
55 justify-items: inherit;
58 /* Miscellaneous form elements */
60 legend {
61 display: block;
62 padding-inline: 2px;
65 fieldset {
66 display: block;
67 margin-inline: 2px;
68 padding-block: 0.35em 0.625em;
69 padding-inline: 0.75em;
70 border: 2px groove ThreeDFace;
71 min-inline-size: min-content;
74 label {
75 cursor: default;
78 /* Default inputs, text inputs, and selects */
80 /* Note: Values in nsNativeTheme IsWidgetStyled function
81 need to match textfield background/border values here */
83 input {
84 display: inline-block;
85 appearance: auto;
86 -moz-default-appearance: textfield;
87 /* The sum of border and padding on block-start and block-end
88 must be the same here, for buttons, and for <select> */
89 padding-block: 1px;
90 padding-inline: 2px;
91 border: 2px inset ButtonBorder;
92 background-color: Field;
93 color: FieldText;
94 font: -moz-field;
95 text-rendering: optimizeLegibility;
96 cursor: text;
97 overflow-clip-box: padding-box content-box;
100 textarea {
101 display: inline-block;
102 appearance: auto;
103 -moz-default-appearance: textarea;
104 margin-block: 1px;
105 border: 2px inset ButtonBorder;
106 padding: 2px;
107 background-color: Field;
108 color: FieldText;
109 font: medium -moz-fixed;
110 text-rendering: optimizeLegibility;
111 vertical-align: text-bottom;
112 cursor: text;
113 resize: both;
114 white-space: pre-wrap;
115 word-wrap: break-word;
118 /* A few properties that we don't want to inherit by default: */
119 input, textarea, select, button, ::file-selector-button {
120 text-align: initial;
121 text-indent: initial;
122 text-shadow: initial;
123 text-transform: initial;
124 word-spacing: initial;
125 letter-spacing: initial;
126 /* Note that line-height is also reset for all these, via the font shorthand */
129 ::placeholder,
130 ::-moz-text-control-editing-root,
131 ::-moz-text-control-preview {
132 overflow: auto;
133 border: 0;
134 /* This is necessary to make overflow-clip-box work */
135 padding: inherit;
136 margin: 0;
137 text-decoration: inherit;
138 display: inline-block;
139 ime-mode: inherit;
140 resize: inherit;
141 scrollbar-width: inherit;
142 -moz-control-character-visibility: visible;
143 overflow-clip-box: inherit;
144 visibility: hidden;
147 ::placeholder,
148 ::-moz-text-control-preview {
150 * Changing display to inline can leads to broken behaviour and will assert.
152 display: inline-block;
155 * Changing resize would display a broken behaviour and will assert.
157 resize: none;
159 overflow: hidden;
162 * The placeholder or preview should be ignored by pointer / selection / etc.
163 * Otherwise, we might have some unexpected behavior like the resize handle
164 * not being selectable.
166 pointer-events: none;
167 user-select: none;
170 ::-moz-text-control-preview {
171 font-family: system-ui;
174 ::placeholder {
175 opacity: 0.54;
178 :not(:-moz-autofill-preview)::-moz-text-control-editing-root,
179 :placeholder-shown:not(:autofill)::placeholder,
180 :autofill::-moz-text-control-preview {
181 visibility: inherit;
184 input::placeholder,
185 input::-moz-text-control-editing-root,
186 input::-moz-text-control-preview {
187 word-wrap: normal;
188 white-space: pre;
189 /* Make the line-height equal to the available height */
190 line-height: -moz-block-height !important;
193 input[type=password]::-moz-text-control-editing-root,
194 input[type=password]::-moz-text-control-preview {
196 * In password fields, any character should be put same direction. Otherwise,
197 * caret position at typing tells everybody whether the character is an RTL
198 * or an LTR character. Unfortunately, this makes odd rendering when bidi
199 * text is unmasked.
201 unicode-bidi: bidi-override;
204 textarea::-moz-text-control-editing-root {
205 scroll-behavior: inherit;
206 overscroll-behavior: inherit;
207 /* StyleAdjuster makes sure that the overflow value ends up being scrollable */
208 overflow: inherit;
211 input:read-write,
212 textarea:read-write {
213 -moz-user-modify: read-write !important;
216 select {
217 margin: 0;
218 border-color: ButtonBorder;
219 font: -moz-list;
220 white-space: nowrap !important;
221 word-wrap: normal !important;
222 cursor: default;
223 box-sizing: border-box;
224 user-select: none;
225 border-width: 2px;
226 border-style: inset;
227 overflow: clip;
228 /* No text-decoration reaching inside, by default */
229 display: inline-block;
230 page-break-inside: avoid;
231 overflow-clip-box: padding-box !important; /* bug 992447 */
232 padding-block: 1px;
234 /* Set some styles for drop down selects. These are overridden below for
235 * list box selects. */
236 padding-inline: 4px;
237 background-color: -moz-Combobox;
238 color: -moz-ComboboxText;
239 vertical-align: baseline;
240 appearance: auto;
241 -moz-default-appearance: menulist;
244 select:-moz-select-list-box {
245 overflow-inline: hidden;
246 overflow-block: scroll;
247 padding-inline: 0;
248 background-color: Field;
249 color: FieldText;
250 vertical-align: text-bottom;
251 appearance: auto;
252 -moz-default-appearance: listbox;
255 @media (-moz-platform: macos) {
256 select:-moz-select-list-box {
257 scrollbar-width: thin;
261 select > button {
262 padding: 0;
263 border: 0;
264 appearance: auto;
265 -moz-default-appearance: -moz-menulist-arrow-button;
267 /* Draw the arrow in the select's color */
268 color: inherit;
270 /* We don't want the button to grow the line-height */
271 font: inherit;
272 max-block-size: 100%;
274 /* Make sure to align properly with the display frame. Note that we want the
275 * baseline of the combobox to match the baseline of the label, so the
276 * dropmarker is what gets the vertical-align. */
277 vertical-align: top;
280 select > label {
281 display: inline-block;
282 overflow: clip;
285 option[label]::before {
286 content: attr(label);
289 select:-moz-select-list-box option,
290 select:-moz-select-list-box optgroup {
291 line-height: normal !important;
294 option {
295 display: block;
296 float: none !important;
297 position: static !important;
298 /* This makes sure that it is a containing block for positioned descendants. */
299 will-change: -moz-fixed-pos-containing-block !important;
301 min-block-size: 1em;
302 padding-block: 2px;
303 user-select: none;
305 * Note that the "UA !important" tests in
306 * layout/style/test/test_animations.html depend on this rule, because
307 * they need some UA !important rule to test. If this changes, use a
308 * different one there.
310 white-space: nowrap !important;
311 word-wrap: normal !important;
314 select > option {
315 padding-inline: 4px;
318 option:checked {
319 background-color: -moz-cellhighlight;
320 color: -moz-cellhighlighttext;
323 select:-moz-select-list-box:focus option:checked {
324 background-color: SelectedItem !important;
325 color: SelectedItemText !important;
328 optgroup {
329 display: block;
330 float: none !important;
331 position: static !important;
332 font-style: italic;
333 font-weight: bold;
334 font-size: unset;
335 user-select: none;
336 white-space: nowrap !important;
337 word-wrap: normal !important;
340 optgroup > option {
341 padding-inline-start: 20px;
342 font-style: normal;
343 font-weight: normal;
346 optgroup:before {
347 display: block;
348 content: "\200b" attr(label);
351 @media (-moz-platform: android) {
352 /* These elements are handled by the prompt module. */
353 select option,
354 select optgroup {
355 pointer-events: none;
359 *|*::-moz-dropdown-list {
360 content: inherit;
361 z-index: 2147483647;
362 background-color: inherit;
363 user-select: none;
364 position: static !important;
365 float: none !important;
368 * We can't change the padding here, because that would affect our
369 * intrinsic inline-size, since we scroll. But at the same time, we want
370 * to make sure that our inline-start border+padding matches the inline-start
371 * border+padding of a combobox so that our scrollbar will line up
372 * with the dropmarker. So set our inline-start border to 2px.
374 border: 1px outset black !important;
375 border-inline-start-width: 2px !important;
378 input:disabled,
379 textarea:disabled,
380 option:disabled,
381 optgroup:disabled,
382 select:disabled {
383 color: GrayText;
384 background-color: -moz-DisabledField;
385 cursor: unset;
388 input:disabled,
389 textarea:disabled {
390 cursor: default;
393 option:disabled,
394 optgroup:disabled {
395 background-color: transparent;
398 /* hidden inputs */
399 input[type=hidden] {
400 appearance: none;
401 -moz-default-appearance: none;
402 display: none !important;
403 padding: unset;
404 border: 0;
405 cursor: auto;
406 -moz-user-focus: ignore;
409 /* image buttons */
410 input[type=image] {
411 appearance: none;
412 -moz-default-appearance: none;
413 padding: unset;
414 border: none;
415 background-color: transparent;
416 font-family: sans-serif;
417 font-size: small;
418 cursor: pointer;
421 input[type=image]:disabled {
422 cursor: unset;
425 /* colored part of the color selector button */
426 ::-moz-color-swatch {
427 width: 100%;
428 height: 100%;
429 min-width: 3px;
430 min-height: 3px;
431 margin-inline: auto;
432 box-sizing: border-box;
433 border: 1px solid grey;
434 display: block;
437 /* radio buttons */
438 input[type=radio] {
439 appearance: auto;
440 -moz-default-appearance: radio;
441 margin-block: 3px 0;
442 margin-inline: 5px 3px;
445 /* check boxes */
446 input[type=checkbox] {
447 appearance: auto;
448 -moz-default-appearance: checkbox;
449 margin-block: 3px;
450 margin-inline: 4px 3px;
453 /* Common features of radio buttons and check boxes */
455 input[type=radio],
456 input[type=checkbox] {
457 box-sizing: border-box;
458 cursor: default;
459 /* unset some values from the general 'input' rule above: */
460 padding: unset;
461 border: unset;
462 background-color: unset;
463 color: unset;
466 input:is([type=radio], [type=checkbox]):is(:disabled, :disabled:active, :disabled:hover:active) {
467 cursor: unset;
470 input[type=search] {
471 box-sizing: border-box;
474 /* buttons */
476 /* Note: Values in nsNativeTheme IsWidgetStyled function
477 need to match button background/border values here */
479 /* Non text-related properties for buttons: these ones are shared with
480 input[type=color] */
481 button,
482 ::file-selector-button,
483 input:is([type=color], [type=reset], [type=button], [type=submit]) {
484 appearance: auto;
485 -moz-default-appearance: button;
486 /* The sum of border and padding on block-start and block-end
487 must be the same here, for text inputs, and for <select>.
488 Note -moz-focus-inner padding does not affect button size. */
489 padding-block: 1px;
490 padding-inline: 8px;
491 border: 2px outset ButtonBorder;
492 background-color: ButtonFace;
493 cursor: default;
494 box-sizing: border-box;
495 user-select: none;
496 overflow-clip-box: padding-box;
499 /* Text-related properties for buttons: these ones are not shared with
500 input[type=color] */
501 button,
502 ::file-selector-button,
503 input:is([type=reset], [type=button], [type=submit]) {
504 color: ButtonText;
505 font: -moz-button;
506 white-space: pre;
507 text-align: center;
508 padding-inline: 4px;
511 input[type=color] {
512 inline-size: 64px;
513 block-size: 32px;
514 padding: 4px;
517 /* https://github.com/whatwg/html/issues/9976 */
518 input:not([type=image i], [type=range i], [type=checkbox i], [type=radio i]) {
519 overflow: clip !important;
520 overflow-clip-margin: 0px !important;
523 button,
524 ::file-selector-button {
525 /* Buttons should lay out like "normal" html, mostly */
526 white-space: unset;
527 /* But no text-decoration reaching inside, by default */
528 display: inline-block;
531 *|*::-moz-button-content {
532 display: block;
533 /* Please keep the declarations below in sync with ::-moz-scrolled-content in
534 ua.css and ::-moz-fieldset-content above. */
535 content: inherit;
536 /* Multicol container */
537 column-count: inherit;
538 column-width: inherit;
539 column-gap: inherit;
540 column-rule: inherit;
541 column-fill: inherit;
542 /* Flex container */
543 flex-direction: inherit;
544 flex-wrap: inherit;
545 /* -webkit-box container (aliased from -webkit versions to -moz versions) */
546 -moz-box-orient: inherit;
547 -moz-box-direction: inherit;
548 -moz-box-pack: inherit;
549 -moz-box-align: inherit;
550 /* Grid container */
551 grid-auto-columns: inherit;
552 grid-auto-rows: inherit;
553 grid-auto-flow: inherit;
554 grid-column-gap: inherit;
555 grid-row-gap: inherit;
556 grid-template-areas: inherit;
557 grid-template-columns: inherit;
558 grid-template-rows: inherit;
559 /* CSS Align */
560 align-content: inherit;
561 align-items: inherit;
562 justify-content: inherit;
563 justify-items: inherit;
566 ::file-selector-button:hover,
567 button:hover,
568 input:is([type=reset], [type=button], [type=submit], [type=color]):hover {
569 color: -moz-buttonhovertext;
570 background-color: -moz-buttonhoverface;
573 ::file-selector-button:active:hover,
574 button:active:hover,
575 input:is([type=reset], [type=button], [type=submit], [type=color]):active:hover {
576 border-style: inset;
577 color: -moz-buttonactivetext;
578 background-color: -moz-buttonactiveface;
581 ::-moz-focus-inner {
582 /* Note this padding only affects the -moz-focus-inner ring, not the button itself */
583 padding-block: 0;
584 padding-inline: 2px;
585 border: 1px dotted transparent;
588 :focus-visible::-moz-focus-inner {
589 border-color: currentColor;
592 :is(:disabled, :disabled:active)::file-selector-button,
593 button:is(:disabled, :disabled:active),
594 input:is([type=reset], [type=button], [type=submit], [type=color]):is(:disabled, :disabled:active),
595 select:is(:disabled, :disabled:active) > button {
596 border-style: outset;
597 cursor: unset;
600 :is(:disabled, :disabled:active)::file-selector-button,
601 button:is(:disabled, :disabled:active),
602 input:is([type=reset], [type=button], [type=submit]):is(:disabled, :disabled:active),
603 select:is(:disabled, :disabled:active) > button {
604 color: GrayText;
605 background-color: -moz-ButtonDisabledFace;
608 /* file selector */
609 input[type=file] {
610 white-space: nowrap !important;
611 overflow-clip-box: padding-box;
612 color: unset;
614 /* Revert rules which apply on all inputs. */
615 appearance: none;
616 -moz-default-appearance: none;
617 cursor: default;
619 border: none;
620 background-color: transparent;
621 padding: unset;
624 input[type=file] > label {
625 display: inline-block;
626 min-inline-size: 12em;
627 text-align: match-parent;
629 color: unset;
630 font-size: unset;
631 letter-spacing: unset;
633 user-select: none;
634 unicode-bidi: plaintext;
637 /* button part of file selector */
638 ::file-selector-button {
639 font-size: unset;
640 letter-spacing: unset;
641 cursor: unset;
642 margin-inline-end: 5px;
646 * Make form controls inherit 'unicode-bidi' transparently as required by
647 * their various anonymous descendants and pseudo-elements:
649 * <textarea> and <input type=text>:
650 * inherit into the scroll frame with pseudo ::-moz-text-control-editing-root
651 * which is a (direct or indirect) child of the text control.
653 * Buttons (either <button>, <input type=submit>, <input type=button>
654 * or <input type=reset>)
655 * inherit into the ':-moz-button-content' pseudo-element.
657 * <select>:
658 * inherit into the label and the <optgroup>'s ':before' pseudo-element,
659 * which is where the label of the <optgroup> gets displayed. The <option>s
660 * don't use anonymous boxes, so they need no special rules.
662 ::placeholder,
663 ::-moz-text-control-editing-root,
664 *|*::-moz-button-content,
665 select > label,
666 optgroup::before {
667 unicode-bidi: inherit;
668 text-overflow: inherit;
671 progress {
672 appearance: auto;
673 -moz-default-appearance: progress-bar;
674 display: inline-block;
675 vertical-align: -0.2em;
677 /* Default style in case of there is appearance: none; */
678 border: 1px solid ThreeDShadow;
679 border-right-color: ThreeDHighlight;
680 border-bottom-color: ThreeDHighlight;
681 /* #e6e6e6 is a light gray. */
682 background-color: #e6e6e6;
683 overflow: clip;
686 progress::-moz-progress-bar,
687 progress::slider-fill {
688 /* Prevent styling that would change the type of frame we construct. */
689 display: inline-block !important;
690 float: none !important;
691 position: static !important;
692 overflow: visible !important;
693 box-sizing: border-box !important;
695 appearance: auto;
696 -moz-default-appearance: progresschunk;
697 height: 100%;
698 width: 100%;
700 /* Default style in case of there is appearance: none; */
701 background-color: #0064b4; /* blue */
704 meter {
705 appearance: auto;
706 -moz-default-appearance: meter;
707 display: inline-block;
708 vertical-align: -0.2em;
709 background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
710 overflow: clip;
713 meter::-moz-meter-bar,
714 meter::slider-fill {
715 /* Block styles that would change the type of frame we construct. */
716 display: inline-block !important;
717 float: none !important;
718 position: static !important;
719 overflow: visible !important;
721 appearance: auto;
722 -moz-default-appearance: meterchunk;
723 height: 100%;
724 width: 100%;
727 meter:-moz-meter-optimum::-moz-meter-bar,
728 meter:-moz-meter-optimum::slider-fill {
729 /* green. */
730 background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
732 meter:-moz-meter-sub-optimum::-moz-meter-bar,
733 meter:-moz-meter-sub-optimum::slider-fill {
734 /* orange. */
735 background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
737 meter:-moz-meter-sub-sub-optimum::-moz-meter-bar,
738 meter:-moz-meter-sub-sub-optimum::slider-fill {
739 /* red. */
740 background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
743 input[type=range] {
744 appearance: auto;
745 -moz-default-appearance: range;
746 margin: 2px;
747 /* Override some rules that apply on all input types: */
748 cursor: default;
749 padding: unset;
750 border: unset;
751 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
752 user-select: none !important;
756 * Layout handles positioning of this pseudo-element specially (so that content
757 * authors can concentrate on styling the thumb without worrying about the
758 * logic to position it). Specifically the 'margin', 'top' and 'left'
759 * properties are ignored.
761 * If content authors want to have a vertical range, they will also need to
762 * set the width/height of this pseudo-element.
764 * TODO(emilio, bug 1663819): Losen these restrictions once these
765 * pseudo-elements are better spec'd out.
767 input[type=range]::-moz-range-track,
768 input[type=range]::slider-track {
769 /* Prevent styling that would change the type of frame we construct. */
770 display: block !important;
771 float: none !important;
772 position: static !important;
773 writing-mode: unset !important;
774 direction: unset !important;
775 block-size: 0.2em; /* same as inline-size below */
776 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
777 user-select: none !important;
780 input[type=range][orient=vertical]::-moz-range-track,
781 input[type=range][orient=vertical]::slider-track {
782 inline-size: 0.2em; /* same as block-size above */
783 block-size: 100%;
787 * Layout handles positioning of this pseudo-element specially (so that content
788 * authors can concentrate on styling this pseudo-element without worrying
789 * about the logic to position it). Specifically the 'margin', 'top' and 'left'
790 * properties are ignored. Additionally, if the range is horizontal, the width
791 * property is ignored, and if the range range is vertical, the height property
792 * is ignored.
794 input[type=range]::-moz-range-progress,
795 input[type=range]::slider-fill {
796 /* Prevent styling that would change the type of frame we construct. */
797 display: block !important;
798 float: none !important;
799 position: static !important;
800 writing-mode: unset !important;
801 direction: unset !important;
802 /* Since one of width/height will be ignored, this just sets the "other"
803 dimension. */
804 width: 0.2em;
805 height: 0.2em;
806 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
807 user-select: none !important;
811 * Layout handles positioning of this pseudo-element specially (so that content
812 * authors can concentrate on styling the thumb without worrying about the
813 * logic to position it). Specifically the 'margin', 'top' and 'left'
814 * properties are ignored.
816 input[type=range]::-moz-range-thumb,
817 input[type=range]::slider-thumb {
818 /* Native theming is atomic for range. Set appearance on the range
819 * to get rid of it. The thumb's appearance is fixed.
821 appearance: auto !important;
822 -moz-default-appearance: range-thumb !important;
823 /* Prevent styling that would change the type of frame we construct. */
824 display: block !important;
825 float: none !important;
826 position: static !important;
827 writing-mode: unset !important;
828 direction: unset !important;
830 width: 1em;
831 height: 1em;
832 border: 0.1em solid #999;
833 border-radius: 0.5em;
834 background-color: #F0F0F0;
835 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */
836 user-select: none !important;
839 input[type=number] {
840 appearance: auto;
841 -moz-default-appearance: number-input;
844 input[type=number]::-moz-number-spin-box {
845 writing-mode: horizontal-tb;
846 display: flex;
847 flex-direction: column;
848 width: max-content;
849 align-self: center;
850 justify-content: center;
851 /* Don't allow the spin buttons to create overflow */
852 max-height: 100%;
853 max-width: 100%;
854 overflow: clip;
857 /* stylelint-disable-next-line media-query-no-invalid */
858 @media (-moz-bool-pref: "dom.forms.number.hide_spin_buttons_when_no_hover_or_focus") {
859 input[type=number]:not(:hover, :focus)::-moz-number-spin-box {
860 opacity: 0;
864 input[type=number]::-moz-number-spin-up,
865 input[type=number]::-moz-number-spin-down {
866 writing-mode: horizontal-tb;
867 appearance: auto;
868 -moz-default-appearance: spinner-upbutton;
869 display: block; /* bug 926670 */
870 flex-grow: 1;
871 cursor: default;
874 input[type=number]::-moz-number-spin-down {
875 -moz-default-appearance: spinner-downbutton;
878 input::-moz-search-clear-button,
879 input::-moz-reveal {
880 display: block;
881 cursor: default;
882 width: 1em;
883 height: 1em;
884 max-height: 100%;
885 max-width: 100%;
886 margin-inline-start: 1px;
887 background-image: url("resource://content-accessible/searchfield-cancel.svg");
888 background-repeat: no-repeat;
889 background-position: center;
890 background-size: contain;
893 input::-moz-reveal {
894 background-image: url("resource://gre-resources/password.svg");
895 -moz-context-properties: fill;
896 fill: currentColor;
899 input:-moz-revealed::-moz-reveal {
900 background-image: url("resource://gre-resources/password-hide.svg");
903 input:-moz-value-empty::-moz-reveal,
904 input:-moz-value-empty::-moz-search-clear-button {
905 visibility: hidden;
908 input:is([type=date], [type=time], [type=datetime-local]) {
909 font-family: -moz-fixed;
910 cursor: default;
913 input:is([type=date], [type=time], [type=datetime-local]):is(:disabled, :read-only) {
914 color: GrayText;
917 input:autofill, select:autofill {
918 background-color: -moz-autofill-background !important;
919 background-image: none !important;
920 color: FieldText !important;