Bumping manifests a=b2g-bump
[gecko.git] / layout / style / forms.css
blob67d47282904f050995b36de7c1584d88cc2e86e8
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 */
11 @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
13 *|*::-moz-fieldset-content {
14 display: block;
15 unicode-bidi: inherit;
16 text-overflow: inherit;
17 overflow: inherit;
18 padding: inherit;
19 height: 100%; /* Need this so percentage heights of kids work right */
22 /* miscellaneous form elements */
24 fieldset > legend {
25 padding-left: 2px;
26 padding-right: 2px;
27 width: -moz-fit-content;
30 legend {
31 display: block;
34 fieldset {
35 display: block;
36 margin-left: 2px;
37 margin-right: 2px;
38 padding: 0.35em 0.625em 0.75em;
39 border: 2px groove ThreeDFace;
42 label {
43 cursor: default;
46 /* default inputs, text inputs, and selects */
48 /* Note: Values in nsNativeTheme IsWidgetStyled function
49 need to match textfield background/border values here */
51 input {
52 -moz-appearance: textfield;
53 /* The sum of border-top, border-bottom, padding-top, padding-bottom
54 must be the same here, for buttons, and for <select> (including its
55 internal padding magic) */
56 padding: 1px;
57 border: 2px inset ThreeDFace;
58 background-color: -moz-Field;
59 color: -moz-FieldText;
60 font: -moz-field;
61 text-rendering: optimizeLegibility;
62 line-height: normal;
63 text-align: start;
64 text-transform: none;
65 word-spacing: normal;
66 letter-spacing: normal;
67 cursor: text;
68 -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#inputFields");
69 text-indent: 0;
70 -moz-user-select: text;
71 text-shadow: none;
72 overflow-clip-box: content-box;
75 input > .anonymous-div,
76 input::-moz-placeholder {
77 word-wrap: normal !important;
78 /* Make the line-height equal to the available height */
79 line-height: -moz-block-height;
82 @-moz-document url-prefix(chrome://) {
83 input.uri-element-right-align:-moz-locale-dir(rtl) {
84 direction: ltr !important;
85 text-align: right !important;
88 /* Make sure that the location bar's alignment in RTL mode changes according
89 to the input box direction if the user switches the text direction using
90 cmd_switchTextDirection (which applies a dir attribute to the <input>). */
91 input.uri-element-right-align[dir=ltr]:-moz-locale-dir(rtl) {
92 text-align: left !important;
96 textarea {
97 margin: 1px 0 1px 0;
98 border: 2px inset ThreeDFace;
99 /* The 1px horizontal padding is for parity with Win/IE */
100 padding: 0px 1px;
101 background-color: -moz-Field;
102 color: -moz-FieldText;
103 font: medium -moz-fixed;
104 text-rendering: optimizeLegibility;
105 text-align: start;
106 text-transform: none;
107 word-spacing: normal;
108 letter-spacing: normal;
109 vertical-align: text-bottom;
110 cursor: text;
111 resize: both;
112 -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas");
113 -moz-appearance: textfield-multiline;
114 text-indent: 0;
115 -moz-user-select: text;
116 text-shadow: none;
117 white-space: pre-wrap;
118 word-wrap: break-word;
119 overflow-clip-box: content-box;
122 textarea > scrollbar {
123 cursor: default;
126 textarea > .anonymous-div,
127 input > .anonymous-div,
128 input::-moz-placeholder,
129 textarea::-moz-placeholder {
130 overflow: auto;
131 border: 0px !important;
132 padding: inherit !important;
133 margin: 0px;
134 text-decoration: inherit;
135 text-decoration-color: inherit;
136 text-decoration-style: inherit;
137 display: inline-block;
138 ime-mode: inherit;
139 resize: inherit;
140 -moz-control-character-visibility: visible;
141 overflow-clip-box: inherit;
144 input > .anonymous-div,
145 input::-moz-placeholder {
146 white-space: pre;
149 input > .anonymous-div.wrap {
150 white-space: pre-wrap;
152 textarea > .anonymous-div.inherit-overflow,
153 input > .anonymous-div.inherit-overflow {
154 overflow: inherit;
157 input::-moz-placeholder,
158 textarea::-moz-placeholder {
160 * Changing display to inline can leads to broken behaviour and will assert.
162 display: inline-block !important;
165 * Changing resize would display a broken behaviour and will assert.
167 resize: none !important;
169 overflow: hidden !important;
172 * The placeholder should be ignored by pointer otherwise, we might have some
173 * unexpected behavior like the resize handle not being selectable.
175 pointer-events: none !important;
177 opacity: 0.54;
180 textarea::-moz-placeholder {
181 white-space: pre-wrap !important;
184 input:-moz-read-write,
185 textarea:-moz-read-write {
186 -moz-user-modify: read-write !important;
189 select {
190 margin: 0;
191 border-color: ThreeDFace;
192 background-color: -moz-Combobox;
193 color: -moz-ComboboxText;
194 font: -moz-list;
196 * Note that the "UA !important" tests in
197 * layout/style/test/test_animations.html depend on this rule, because
198 * they need some UA !important rule to test. If this changes, use a
199 * different one there.
201 line-height: normal !important;
202 white-space: nowrap !important;
203 word-wrap: normal !important;
204 text-align: start;
205 cursor: default;
206 box-sizing: border-box;
207 -moz-user-select: none;
208 -moz-appearance: menulist;
209 border-width: 2px;
210 border-style: inset;
211 text-indent: 0;
212 overflow: -moz-hidden-unscrollable;
213 text-shadow: none;
214 /* No text-decoration reaching inside, by default */
215 display: inline-block;
216 page-break-inside: avoid;
217 overflow-clip-box: padding-box !important; /* bug 992447 */
220 /* Need the "select[size][multiple]" selector to override the settings on
221 'select[size="1"]', eg if one has <select size="1" multiple> */
223 select[size],
224 select[multiple],
225 select[size][multiple] {
226 /* Different alignment and padding for listbox vs combobox */
227 background-color: -moz-Field;
228 color: -moz-FieldText;
229 vertical-align: text-bottom;
230 padding: 1px 0 1px 0;
231 -moz-appearance: listbox;
234 select[size="0"],
235 select[size="1"] {
236 /* Except this is not a listbox */
237 background-color: -moz-Combobox;
238 color: -moz-ComboboxText;
239 vertical-align: baseline;
240 padding: 0;
241 -moz-appearance: menulist;
244 select > button {
245 width: 12px;
246 height: 12px;
247 white-space: nowrap;
248 position: static !important;
249 background-image: url("arrow.gif") !important;
250 background-repeat: no-repeat !important;
251 background-position: center !important;
252 -moz-appearance: menulist-button;
254 /* Make sure to size correctly if the combobox has a non-auto height. */
255 height: 100% ! important;
256 box-sizing: border-box ! important;
259 Make sure to align properly with the display frame. Note that we
260 want the baseline of the combobox to match the baseline of the
261 display frame, so the dropmarker is what gets the vertical-align.
263 vertical-align: top !important;
266 select > button:active {
267 background-image: url("arrowd.gif") !important;
270 select:empty {
271 width: 2.5em;
274 *|*::-moz-display-comboboxcontrol-frame {
275 overflow: -moz-hidden-unscrollable;
276 /* This top/bottom padding plus the combobox top/bottom border need to
277 add up to the top/bottom borderpadding of text inputs and buttons */
278 padding-top: 1px;
279 padding-bottom: 1px;
280 -moz-padding-start: 4px;
281 -moz-padding-end: 0;
282 color: inherit;
283 white-space: nowrap;
284 text-align: inherit;
285 -moz-user-select: none;
286 /* Make sure to size correctly if the combobox has a non-auto height. */
287 height: 100% ! important;
288 box-sizing: border-box ! important;
289 line-height: -moz-block-height;
292 option {
293 display: block;
294 float: none !important;
295 position: static !important;
296 min-height: 1em;
297 line-height: normal !important;
298 -moz-user-select: none;
299 text-indent: 0;
300 white-space: nowrap !important;
301 word-wrap: normal !important;
304 select > option {
305 padding-top : 0;
306 padding-bottom: 0;
307 -moz-padding-start: 3px;
308 -moz-padding-end: 5px;
311 option:checked {
312 background-color: -moz-html-cellhighlight !important;
313 color: -moz-html-cellhighlighttext !important;
316 select:focus > option:checked,
317 select:focus > optgroup > option:checked {
318 background-color: Highlight ! important;
319 color: HighlightText ! important;
322 optgroup {
323 display: block;
324 float: none !important;
325 position: static !important;
326 font: -moz-list;
327 line-height: normal !important;
328 font-style: italic;
329 font-weight: bold;
330 font-size: inherit;
331 -moz-user-select: none;
332 text-indent: 0;
333 white-space: nowrap !important;
334 word-wrap: normal !important;
337 optgroup > option {
338 -moz-padding-start: 20px;
339 font-style: normal;
340 font-weight: normal;
343 optgroup:before {
344 display: block;
345 content: attr(label);
348 *|*::-moz-dropdown-list {
349 z-index: 2147483647;
350 background-color: inherit;
351 -moz-user-select: none;
352 position: static !important;
353 float: none !important;
356 * We can't change the padding here, because that would affect our
357 * intrinsic width, since we scroll. But at the same time, we want
358 * to make sure that our left border+padding matches the left
359 * border+padding of a combobox so that our scrollbar will line up
360 * with the dropmarker. So set our left border to 2px.
362 border: 1px outset black !important;
363 border-left-width: 2px ! important;
366 input:disabled,
367 textarea:disabled,
368 option:disabled,
369 optgroup:disabled,
370 select:disabled:disabled /* Need the pseudo-class twice to have the specificity
371 be at least the same as select[size][multiple] above */
373 -moz-user-input: disabled;
374 color: GrayText;
375 background-color: ThreeDFace;
376 cursor: inherit;
379 input:disabled,
380 textarea:disabled {
381 cursor: default;
384 option:disabled,
385 optgroup:disabled {
386 background-color: transparent;
389 /* hidden inputs */
390 input[type="hidden"] {
391 -moz-appearance: none;
392 display: none !important;
393 padding: 0;
394 border: 0;
395 cursor: auto;
396 -moz-user-focus: ignore;
397 -moz-binding: none;
400 /* image buttons */
401 input[type="image"] {
402 -moz-appearance: none;
403 padding: 0;
404 border: none;
405 background-color: transparent;
406 font-family: sans-serif;
407 font-size: small;
408 cursor: pointer;
409 -moz-binding: none;
412 input[type="image"]:disabled {
413 cursor: inherit;
416 input[type="image"]:-moz-focusring {
417 /* Don't specify the outline-color, we should always use initial value. */
418 outline: 1px dotted;
421 /* file selector */
422 input[type="file"] {
423 display: inline-block;
424 white-space: nowrap;
425 overflow: hidden;
426 overflow-clip-box: padding-box;
427 color: inherit;
429 /* Revert rules which apply on all inputs. */
430 -moz-appearance: none;
431 -moz-binding: none;
432 cursor: default;
434 border: none;
435 background-color: transparent;
436 padding: 0;
439 input[type="file"] > xul|label {
440 min-width: 12em;
441 -moz-padding-start: 5px;
443 color: inherit;
444 font-size: inherit;
445 letter-spacing: inherit;
448 * Force the text to have LTR directionality. Otherwise filenames containing
449 * RTL characters will be reordered with chaotic results.
451 direction: ltr !important;
454 /* button part of file selector */
455 input[type="file"] > button[type="button"] {
456 height: inherit;
457 font-size: inherit;
458 letter-spacing: inherit;
459 cursor: inherit;
462 /* colored part of the color selector button */
463 input[type="color"]:-moz-system-metric(color-picker-available)::-moz-color-swatch {
464 width: 100%;
465 height: 100%;
466 min-width: 3px;
467 min-height: 3px;
468 margin-left: auto;
469 margin-right: auto;
470 box-sizing: border-box;
471 border: 1px solid grey;
472 display: block;
475 /* Try to make RTL <input type='file'> look nicer. */
476 /* TODO: use text-align: match-parent when bug 645642 is fixed. */
477 input[type="file"]:-moz-dir(rtl) > xul|label {
478 -moz-padding-start: 0px;
479 padding-right: 5px;
480 text-align: right;
483 /* radio buttons */
484 input[type="radio"] {
485 -moz-appearance: radio;
486 margin: 3px 3px 0px 5px;
487 border-radius: 100% !important;
490 /* check boxes */
491 input[type="checkbox"] {
492 -moz-appearance: checkbox;
493 margin: 3px 3px 3px 4px;
494 border-radius: 0 !important;
497 /* common features of radio buttons and check boxes */
499 /* NOTE: The width, height, border-width, and padding here must all
500 add up the way nsFormControlFrame::GetIntrinsic(Width|Height)
501 expects them to, or they will not come out with total width equal
502 to total height on sites that set their 'width' or 'height' to 'auto'.
503 (Should we maybe set !important on width and height, then?) */
504 input[type="radio"],
505 input[type="checkbox"] {
506 box-sizing: border-box;
507 width: 13px;
508 height: 13px;
509 cursor: default;
510 padding: 0 !important;
511 -moz-binding: none;
512 /* same colors as |input| rule, but |!important| this time. */
513 background-color: -moz-Field ! important;
514 color: -moz-FieldText ! important;
515 border: 2px inset ThreeDFace ! important;
518 input[type="radio"]:disabled,
519 input[type="radio"]:disabled:active,
520 input[type="radio"]:disabled:hover,
521 input[type="radio"]:disabled:hover:active,
522 input[type="checkbox"]:disabled,
523 input[type="checkbox"]:disabled:active,
524 input[type="checkbox"]:disabled:hover,
525 input[type="checkbox"]:disabled:hover:active {
526 padding: 1px;
527 border: 1px inset ThreeDShadow ! important;
528 /* same as above, but !important */
529 color: GrayText ! important;
530 background-color: ThreeDFace ! important;
531 cursor: inherit;
534 input[type="checkbox"]:-moz-focusring,
535 input[type="radio"]:-moz-focusring {
536 border-style: groove !important;
539 input[type="checkbox"]:hover:active,
540 input[type="radio"]:hover:active {
541 background-color: ThreeDFace ! important;
542 border-style: inset !important;
545 /* buttons */
547 /* Note: Values in nsNativeTheme IsWidgetStyled function
548 need to match button background/border values here */
550 /* Non text-related properties for buttons: these ones are shared with
551 input[type="color"] */
552 button,
553 input[type="color"]:-moz-system-metric(color-picker-available),
554 input[type="reset"],
555 input[type="button"],
556 input[type="submit"] {
557 -moz-appearance: button;
558 /* The sum of border-top, border-bottom, padding-top, padding-bottom
559 must be the same here, for text inputs, and for <select>. For
560 buttons, make sure to include the -moz-focus-inner border/padding. */
561 padding: 0px 6px 0px 6px;
562 border: 2px outset ButtonFace;
563 background-color: ButtonFace;
564 cursor: default;
565 box-sizing: border-box;
566 -moz-user-select: none;
567 -moz-binding: none;
570 /* Text-related properties for buttons: these ones are not shared with
571 input[type="color"] */
572 button,
573 input[type="reset"],
574 input[type="button"],
575 input[type="submit"] {
576 color: ButtonText;
577 font: -moz-button;
578 line-height: normal;
579 white-space: pre;
580 text-align: center;
581 text-shadow: none;
582 overflow-clip-box: padding-box;
585 input[type="color"]:-moz-system-metric(color-picker-available) {
586 width: 64px;
587 height: 23px;
590 button {
591 /* Buttons should lay out like "normal" html, mostly */
592 white-space: inherit;
593 text-indent: 0;
594 /* But no text-decoration reaching inside, by default */
595 display: inline-block;
598 *|*::-moz-button-content {
599 display: block;
602 button:hover,
603 input[type="color"]:-moz-system-metric(color-picker-available):hover,
604 input[type="reset"]:hover,
605 input[type="button"]:hover,
606 input[type="submit"]:hover {
607 background-color: -moz-buttonhoverface;
610 button:hover,
611 input[type="reset"]:hover,
612 input[type="button"]:hover,
613 input[type="submit"]:hover {
614 color: -moz-buttonhovertext;
617 button:active:hover,
618 input[type="color"]:-moz-system-metric(color-picker-available):active:hover,
619 input[type="reset"]:active:hover,
620 input[type="button"]:active:hover,
621 input[type="submit"]:active:hover {
622 padding: 0px 5px 0px 7px;
623 border-style: inset;
624 background-color: ButtonFace;
627 button:active:hover,
628 input[type="reset"]:active:hover,
629 input[type="button"]:active:hover,
630 input[type="submit"]:active:hover {
631 color: ButtonText;
634 button::-moz-focus-inner,
635 input[type="color"]:-moz-system-metric(color-picker-available)::-moz-focus-inner,
636 input[type="reset"]::-moz-focus-inner,
637 input[type="button"]::-moz-focus-inner,
638 input[type="submit"]::-moz-focus-inner,
639 input[type="file"] > button[type="button"]::-moz-focus-inner {
640 padding: 0px 2px 0px 2px;
641 border: 1px dotted transparent;
644 button:-moz-focusring::-moz-focus-inner,
645 input[type="color"]:-moz-system-metric(color-picker-available):-moz-focusring::-moz-focus-inner,
646 input[type="reset"]:-moz-focusring::-moz-focus-inner,
647 input[type="button"]:-moz-focusring::-moz-focus-inner,
648 input[type="submit"]:-moz-focusring::-moz-focus-inner,
649 input[type="file"] > button[type="button"]:-moz-focusring::-moz-focus-inner {
650 border-color: ButtonText;
653 button:disabled:active, button:disabled,
654 input[type="color"]:-moz-system-metric(color-picker-available):disabled:active,
655 input[type="color"]:-moz-system-metric(color-picker-available):disabled,
656 input[type="reset"]:disabled:active,
657 input[type="reset"]:disabled,
658 input[type="button"]:disabled:active,
659 input[type="button"]:disabled,
660 select:disabled > button,
661 select:disabled > button,
662 input[type="submit"]:disabled:active,
663 input[type="submit"]:disabled {
664 /* The sum of border-top, border-bottom, padding-top, padding-bottom
665 must be the same here and for text inputs */
666 padding: 0px 6px 0px 6px;
667 border: 2px outset ButtonFace;
668 cursor: inherit;
671 button:disabled:active, button:disabled,
672 input[type="reset"]:disabled:active,
673 input[type="reset"]:disabled,
674 input[type="button"]:disabled:active,
675 input[type="button"]:disabled,
676 select:disabled > button,
677 select:disabled > button,
678 input[type="submit"]:disabled:active,
679 input[type="submit"]:disabled {
680 color: GrayText;
684 * Make form controls inherit 'unicode-bidi' transparently as required by
685 * their various anonymous descendants and pseudo-elements:
687 * <textarea> and <input type="text">:
688 * inherit into the XULScroll frame with class 'anonymous-div' which is a
689 * child of the text control.
691 * Buttons (either <button>, <input type="submit">, <input type="button">
692 * or <input type="reset">)
693 * inherit into the ':-moz-button-content' pseudo-element.
695 * <select>:
696 * inherit into the ':-moz-display-comboboxcontrol-frame' pseudo-element and
697 * the <optgroup>'s ':before' pseudo-element, which is where the label of
698 * the <optgroup> gets displayed. The <option>s don't use anonymous boxes,
699 * so they need no special rules.
701 textarea > .anonymous-div,
702 input > .anonymous-div,
703 input::-moz-placeholder,
704 textarea::-moz-placeholder,
705 *|*::-moz-button-content,
706 *|*::-moz-display-comboboxcontrol-frame,
707 optgroup:before {
708 unicode-bidi: inherit;
709 text-overflow: inherit;
713 * Set default style for invalid elements.
715 :not(output):-moz-ui-invalid {
716 box-shadow: 0 0 1.5px 1px red;
719 :not(output):-moz-ui-invalid:-moz-focusring {
720 box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
723 output:-moz-ui-invalid {
724 color: red;
727 @media print {
728 input, textarea, select, button {
729 -moz-user-input: none !important;
732 input[type="file"] { height: 2em; }
735 progress {
736 -moz-appearance: progressbar;
737 display: inline-block;
738 vertical-align: -0.2em;
740 /* Default style in case of there is -moz-appearance: none; */
741 border: 2px solid;
742 /* #e6e6e6 is a light gray. */
743 -moz-border-top-colors: ThreeDShadow #e6e6e6;
744 -moz-border-right-colors: ThreeDHighlight #e6e6e6;
745 -moz-border-bottom-colors: ThreeDHighlight #e6e6e6;
746 -moz-border-left-colors: ThreeDShadow #e6e6e6;
747 background-color: #e6e6e6;
750 ::-moz-progress-bar {
751 /* Prevent styling that would change the type of frame we construct. */
752 display: inline-block ! important;
753 float: none ! important;
754 position: static ! important;
755 overflow: visible ! important;
756 box-sizing: border-box ! important;
758 -moz-appearance: progresschunk;
759 height: 100%;
760 width: 100%;
762 /* Default style in case of there is -moz-appearance: none; */
763 background-color: #0064b4; /* blue */
766 meter {
767 -moz-appearance: meterbar;
768 display: inline-block;
769 vertical-align: -0.2em;
771 background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
774 ::-moz-meter-bar {
775 /* Block styles that would change the type of frame we construct. */
776 display: inline-block ! important;
777 float: none ! important;
778 position: static ! important;
779 overflow: visible ! important;
781 -moz-appearance: meterchunk;
782 height: 100%;
783 width: 100%;
786 :-moz-meter-optimum::-moz-meter-bar {
787 /* green. */
788 background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
790 :-moz-meter-sub-optimum::-moz-meter-bar {
791 /* orange. */
792 background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
794 :-moz-meter-sub-sub-optimum::-moz-meter-bar {
795 /* red. */
796 background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
799 input[type=range] {
800 -moz-appearance: range;
801 display: inline-block;
802 width: 12em;
803 height: 1.3em;
804 margin: 0 0.7em;
805 /* Override some rules that apply on all input types: */
806 cursor: default;
807 background: none;
808 border: none;
809 -moz-binding: none; /* we don't want any of platformHTMLBindings.xml#inputFields */
810 /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
811 -moz-user-select: none ! important;
814 input[type=range][orient=vertical] {
815 width: 1.3em;
816 height: 12em;
820 * Ideally we'd also require :-moz-focusring here, but that doesn't currently
821 * work. Instead we only use the -moz-focus-outer border style if
822 * NS_EVENT_STATE_FOCUSRING is set (the check is in
823 * nsRangeFrame::BuildDisplayList).
825 input[type=range]::-moz-focus-outer {
826 border: 1px dotted black;
830 * Layout handles positioning of this pseudo-element specially (so that content
831 * authors can concentrate on styling the thumb without worrying about the
832 * logic to position it). Specifically the 'margin', 'top' and 'left'
833 * properties are ignored.
835 * If content authors want to have a vertical range, they will also need to
836 * set the width/height of this pseudo-element.
838 input[type=range]::-moz-range-track {
839 /* Prevent styling that would change the type of frame we construct. */
840 display: inline-block !important;
841 float: none !important;
842 position: static !important;
843 border: none;
844 background-color: #999;
845 width: 100%;
846 height: 0.2em;
847 /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
848 -moz-user-select: none ! important;
851 input[type=range][orient=vertical]::-moz-range-track {
852 border-top: none;
853 border-bottom: none;
854 width: 0.2em;
855 height: 100%;
859 * Layout handles positioning of this pseudo-element specially (so that content
860 * authors can concentrate on styling this pseudo-element without worrying
861 * about the logic to position it). Specifically the 'margin', 'top' and 'left'
862 * properties are ignored. Additionally, if the range is horizontal, the width
863 * property is ignored, and if the range range is vertical, the height property
864 * is ignored.
866 input[type=range]::-moz-range-progress {
867 /* Prevent styling that would change the type of frame we construct. */
868 display: inline-block !important;
869 float: none !important;
870 position: static !important;
871 /* Since one of width/height will be ignored, this just sets the "other"
872 dimension.
874 width: 0.2em;
875 height: 0.2em;
876 /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
877 -moz-user-select: none ! important;
881 * Layout handles positioning of this pseudo-element specially (so that content
882 * authors can concentrate on styling the thumb without worrying about the
883 * logic to position it). Specifically the 'margin', 'top' and 'left'
884 * properties are ignored.
886 input[type=range]::-moz-range-thumb {
887 /* Native theming is atomic for range. Set -moz-appearance on the range
888 * to get rid of it. The thumb's -moz-appearance is fixed.
890 -moz-appearance: range-thumb !important;
891 /* Prevent styling that would change the type of frame we construct. */
892 display: inline-block !important;
893 float: none !important;
894 position: static !important;
895 width: 1em;
896 height: 1em;
897 border: 0.1em solid #999;
898 border-radius: 0.5em;
899 background-color: #F0F0F0;
900 /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
901 -moz-user-select: none ! important;
904 /* As a temporary workaround until bug 677302 the rule for input[type=number]
905 * has moved to number-control.css
908 input[type=number]::-moz-number-wrapper {
909 /* Prevent styling that would change the type of frame we construct. */
910 display: flex;
911 float: none !important;
912 position: static !important;
913 height: 100%;
916 input[type=number]::-moz-number-text {
917 -moz-appearance: none;
918 /* work around autofocus bug 939248 on initial load */
919 -moz-user-modify: read-write;
920 /* This pseudo-element is also an 'input' element (nested inside and
921 * distinct from the <input type=number> element) so we need to prevent the
922 * explicit setting of 'text-align' by the general CSS rule for 'input'
923 * above. We want to inherit its value from its <input type=number>
924 * ancestor, not have that general CSS rule reset it.
926 text-align: inherit;
927 flex: 1;
928 min-width: 0;
929 padding: 0;
930 border: 0;
931 margin: 0;
934 input[type=number]::-moz-number-spin-box {
935 display: flex;
936 flex-direction: column;
937 %ifdef XP_WIN
938 /* The Window's Theme's spin buttons have a very narrow minimum width, so
939 * make it something reasonable:
941 width: 16px;
942 %endif
943 height: 0;
944 align-self: center;
945 justify-content: center;
948 input[type=number]::-moz-number-spin-up {
949 -moz-appearance: spinner-upbutton;
950 display: block; /* bug 926670 */
951 flex: none;
952 cursor: default;
953 /* Style for when native theming is off: */
954 background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,4 L3,0 5,4" fill="dimgrey"/></svg>');
955 background-repeat: no-repeat;
956 background-position: center bottom;
957 border: 1px solid darkgray;
958 border-bottom: none;
959 border-top-left-radius: 4px;
960 border-top-right-radius: 4px;
963 input[type=number]::-moz-number-spin-down {
964 -moz-appearance: spinner-downbutton;
965 display: block; /* bug 926670 */
966 flex: none;
967 cursor: default;
968 /* Style for when native theming is off: */
969 background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,1 L3,5 5,1" fill="dimgrey"/></svg>');
970 background-repeat: no-repeat;
971 background-position: center top;
972 border: 1px solid darkgray;
973 border-top: none;
974 border-bottom-left-radius: 4px;
975 border-bottom-right-radius: 4px;
978 input[type="number"] > div > div > div:hover {
979 /* give some indication of hover state for the up/down buttons */
980 background-color: lightblue;