forms.css (23192B)
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/. */ 4 5 /** 6 Styles for old GFX form widgets 7 **/ 8 9 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ 10 11 *|*::-moz-fieldset-content { 12 display: block; /* StyleAdjuster::adjust_for_fieldset_content overrides this in some cases */ 13 unicode-bidi: inherit; 14 text-overflow: inherit; 15 overflow: inherit; 16 resize: inherit; 17 /* Need to inherit border-radius too, so when the fieldset has rounded 18 borders we don't leak out the corners for hit-testing purposes. */ 19 border-radius: inherit; 20 padding: inherit; 21 box-decoration-break: inherit; 22 block-size: 100%; /* Need this so percentage block-sizes of kids work right */ 23 /* Please keep the declarations below in sync with ::-moz-scrolled-content in 24 ua.css. */ 25 content: inherit; 26 /* Multicol container */ 27 column-count: inherit; 28 column-width: inherit; 29 column-gap: inherit; 30 column-rule: inherit; 31 column-fill: inherit; 32 /* Flex container */ 33 flex-direction: inherit; 34 flex-wrap: inherit; 35 /* -webkit-box container (aliased from -webkit versions to -moz versions) */ 36 -moz-box-orient: inherit; 37 -moz-box-direction: inherit; 38 -moz-box-pack: inherit; 39 -moz-box-align: inherit; 40 /* Grid container */ 41 grid-auto-columns: inherit; 42 grid-auto-rows: inherit; 43 grid-auto-flow: inherit; 44 grid-column-gap: inherit; 45 grid-row-gap: inherit; 46 grid-template-areas: inherit; 47 grid-template-columns: inherit; 48 grid-template-rows: inherit; 49 /* CSS Align */ 50 align-content: inherit; 51 align-items: inherit; 52 justify-content: inherit; 53 justify-items: inherit; 54 } 55 56 /* Miscellaneous form elements */ 57 58 legend { 59 display: block; 60 padding-inline: 2px; 61 } 62 63 fieldset { 64 display: block; 65 margin-inline: 2px; 66 padding-block: 0.35em 0.625em; 67 padding-inline: 0.75em; 68 border: 2px groove ThreeDFace; 69 min-inline-size: min-content; 70 } 71 72 label { 73 cursor: default; 74 /* If you add declarations here, consider whether the select > label and file 75 * input label need them as well. */ 76 } 77 78 /* Default inputs, text inputs, and selects */ 79 80 /* Note: Values in nsNativeTheme IsWidgetStyled function 81 need to match textfield background/border values here */ 82 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 } 98 99 textarea { 100 display: inline-block; 101 appearance: auto; 102 -moz-default-appearance: textarea; 103 margin-block: 1px; 104 border: 2px inset ButtonBorder; 105 padding: 2px; 106 background-color: Field; 107 color: FieldText; 108 font: medium -moz-fixed; 109 text-rendering: optimizeLegibility; 110 vertical-align: text-bottom; 111 cursor: text; 112 resize: both; 113 white-space: pre-wrap; 114 word-wrap: break-word; 115 } 116 117 /* A few properties that we don't want to inherit by default: */ 118 input, 119 textarea, 120 select, 121 button, 122 ::file-selector-button { 123 text-align: initial; 124 text-indent: initial; 125 text-shadow: initial; 126 text-transform: initial; 127 word-spacing: initial; 128 letter-spacing: initial; 129 /* Note that line-height is also reset for all these, via the font shorthand */ 130 } 131 132 ::placeholder, 133 ::-moz-text-control-editing-root, 134 ::-moz-text-control-preview { 135 overflow: auto; 136 border: 0; 137 padding: inherit; 138 margin: 0; 139 text-decoration: inherit; 140 display: inline-block; 141 ime-mode: inherit; 142 resize: inherit; 143 scrollbar-width: inherit; 144 -moz-control-character-visibility: visible; 145 visibility: hidden; 146 } 147 148 ::placeholder, 149 ::-moz-text-control-preview { 150 /* 151 * Changing resize would display a broken behaviour and will assert. 152 */ 153 resize: none; 154 overflow: hidden; 155 156 /* 157 * The placeholder or preview should be ignored by pointer / selection / etc. 158 * Otherwise, we might have some unexpected behavior like the resize handle 159 * not being selectable. 160 */ 161 pointer-events: none; 162 user-select: none; 163 } 164 165 ::-moz-text-control-preview { 166 font-family: system-ui; 167 } 168 169 ::placeholder { 170 -webkit-text-security: none; 171 color: color-mix(in srgb, currentColor 54%, transparent); 172 } 173 174 :not(:-moz-autofill-preview)::-moz-text-control-editing-root, 175 :placeholder-shown:not(:autofill)::placeholder, 176 :autofill::-moz-text-control-preview { 177 visibility: inherit; 178 } 179 180 input::placeholder, 181 input::-moz-text-control-editing-root, 182 input::-moz-text-control-preview { 183 scrollbar-width: none; 184 resize: none; 185 word-wrap: normal; 186 white-space: pre; 187 hyphens: none; 188 /* Make the line-height equal to the available height */ 189 line-height: -moz-block-height !important; 190 } 191 192 input[type="password"] { 193 -moz-default-appearance: password-input; 194 } 195 196 input[type="password"]::-moz-text-control-editing-root, 197 input[type="password"]::-moz-text-control-preview { 198 /* 199 * In password fields, any character should be put same direction. Otherwise, 200 * caret position at typing tells everybody whether the character is an RTL 201 * or an LTR character. Unfortunately, this makes odd rendering when bidi 202 * text is unmasked. 203 */ 204 unicode-bidi: bidi-override; 205 } 206 207 textarea::-moz-text-control-editing-root { 208 scroll-behavior: inherit; 209 overscroll-behavior: inherit; 210 /* StyleAdjuster makes sure that the overflow value ends up being scrollable */ 211 overflow: inherit; 212 } 213 214 select { 215 margin: 0; 216 border-color: ButtonBorder; 217 font: -moz-list; 218 white-space: nowrap !important; 219 word-wrap: normal !important; 220 cursor: default; 221 box-sizing: border-box; 222 user-select: none; 223 border-width: 2px; 224 border-style: inset; 225 overflow: clip; 226 /* No text-decoration reaching inside, by default */ 227 display: inline-block; 228 break-inside: avoid; 229 padding-block: 1px; 230 231 /* Set some styles for drop down selects. These are overridden below for 232 * list box selects. */ 233 padding-inline: 4px; 234 background-color: -moz-Combobox; 235 color: -moz-ComboboxText; 236 vertical-align: baseline; 237 appearance: auto; 238 -moz-default-appearance: menulist; 239 } 240 241 select:-moz-select-list-box { 242 overflow-inline: hidden; 243 overflow-block: scroll; 244 padding-inline: 0; 245 background-color: Field; 246 color: FieldText; 247 vertical-align: text-bottom; 248 appearance: auto; 249 -moz-default-appearance: listbox; 250 251 @media (-moz-platform: macos) { 252 scrollbar-width: thin; 253 } 254 } 255 256 select > button { 257 padding: 0; 258 border: 0; 259 appearance: auto; 260 -moz-default-appearance: -moz-menulist-arrow-button; 261 pointer-events: none; 262 263 /* Draw the arrow in the select's color */ 264 color: inherit; 265 266 /* We don't want the button to grow the line-height */ 267 font: inherit; 268 max-block-size: 100%; 269 270 /* Make sure to align properly with the display frame. Note that we want the 271 * baseline of the combobox to match the baseline of the label, so the 272 * dropmarker is what gets the vertical-align. */ 273 vertical-align: top; 274 } 275 276 select > label { 277 display: inline-block; 278 overflow: clip; 279 pointer-events: none; 280 cursor: unset; 281 /* Required for making nsIFrame::PeekOffset treat anonymous content in 282 * <select> as not selectable. */ 283 user-select: none; 284 } 285 286 option[label]::before { 287 content: attr(label); 288 } 289 290 select:-moz-select-list-box option, 291 select:-moz-select-list-box optgroup { 292 line-height: normal !important; 293 } 294 295 option { 296 display: block; 297 float: none !important; 298 position: static !important; 299 /* This makes sure that it is a containing block for positioned descendants. */ 300 will-change: -moz-fixed-pos-containing-block !important; 301 302 min-block-size: 1em; 303 min-inline-size: min-content; 304 padding-block: 2px; 305 user-select: none; 306 /* 307 * Note that the "UA !important" tests in 308 * layout/style/test/test_animations.html depend on this rule, because 309 * they need some UA !important rule to test. If this changes, use a 310 * different one there. 311 */ 312 white-space: nowrap !important; 313 word-wrap: normal !important; 314 } 315 316 option:read-write { 317 user-select: text; 318 } 319 320 select > option { 321 padding-inline: 4px; 322 } 323 324 select:-moz-select-list-box option:checked { 325 background-color: -moz-cellhighlight; 326 color: -moz-cellhighlighttext; 327 } 328 329 select:-moz-select-list-box:focus option:checked { 330 background-color: SelectedItem !important; 331 color: SelectedItemText !important; 332 } 333 334 optgroup { 335 display: block; 336 float: none !important; 337 position: static !important; 338 font-style: italic; 339 font-weight: bold; 340 font-size: unset; 341 user-select: none; 342 white-space: nowrap !important; 343 word-wrap: normal !important; 344 } 345 346 optgroup > option { 347 padding-inline-start: 20px; 348 font-style: normal; 349 font-weight: normal; 350 } 351 352 optgroup:before { 353 display: block; 354 content: "\200b" attr(label); 355 } 356 357 @media (-moz-platform: android) { 358 /* These elements are handled by the prompt module. */ 359 select option, 360 select optgroup { 361 pointer-events: none; 362 } 363 } 364 365 *|*::-moz-dropdown-list { 366 content: inherit; 367 z-index: 2147483647; 368 background-color: inherit; 369 user-select: none; 370 position: static !important; 371 float: none !important; 372 373 /* 374 * We can't change the padding here, because that would affect our 375 * intrinsic inline-size, since we scroll. But at the same time, we want 376 * to make sure that our inline-start border+padding matches the inline-start 377 * border+padding of a combobox so that our scrollbar will line up 378 * with the dropmarker. So set our inline-start border to 2px. 379 */ 380 border: 1px outset black !important; 381 border-inline-start-width: 2px !important; 382 } 383 384 input:disabled, 385 textarea:disabled, 386 option:disabled, 387 optgroup:disabled, 388 select:disabled { 389 color: GrayText; 390 background-color: -moz-DisabledField; 391 cursor: unset; 392 } 393 394 input:disabled, 395 textarea:disabled { 396 cursor: default; 397 } 398 399 option:disabled, 400 optgroup:disabled { 401 background-color: transparent; 402 } 403 404 /* hidden inputs */ 405 input[type="hidden"] { 406 appearance: none; 407 -moz-default-appearance: none; 408 display: none !important; 409 padding: unset; 410 border: 0; 411 cursor: auto; 412 -moz-user-focus: ignore; 413 } 414 415 /* image buttons */ 416 input[type="image"] { 417 appearance: none; 418 -moz-default-appearance: none; 419 padding: unset; 420 border: none; 421 background-color: transparent; 422 font-family: sans-serif; 423 font-size: small; 424 cursor: pointer; 425 } 426 427 input[type="image"]:disabled { 428 cursor: unset; 429 } 430 431 /* colored part of the color selector button */ 432 ::-moz-color-swatch { 433 width: 100%; 434 height: 100%; 435 min-width: 3px; 436 min-height: 3px; 437 margin-inline: auto; 438 box-sizing: border-box; 439 border: 1px solid grey; 440 display: block; 441 } 442 443 /* radio buttons */ 444 input[type="radio"] { 445 appearance: auto; 446 -moz-default-appearance: radio; 447 margin-block: 3px 0; 448 margin-inline: 5px 3px; 449 } 450 451 /* check boxes */ 452 input[type="checkbox"] { 453 appearance: auto; 454 -moz-default-appearance: checkbox; 455 margin-block: 3px; 456 margin-inline: 4px 3px; 457 } 458 459 /* Common features of radio buttons and check boxes */ 460 461 input[type="radio"], 462 input[type="checkbox"] { 463 box-sizing: border-box; 464 cursor: default; 465 /* unset some values from the general 'input' rule above: */ 466 padding: unset; 467 border: unset; 468 background-color: unset; 469 color: unset; 470 } 471 472 input:is([type="radio"], [type="checkbox"]):is(:disabled, :disabled:active, :disabled:hover:active) { 473 cursor: unset; 474 } 475 476 input[type="search"] { 477 box-sizing: border-box; 478 } 479 480 /* buttons */ 481 482 /* Note: Values in nsNativeTheme IsWidgetStyled function 483 need to match button background/border values here */ 484 485 /* Non text-related properties for buttons: these ones are shared with 486 input[type=color] */ 487 button, 488 ::file-selector-button, 489 input:is([type="color"], [type="reset"], [type="button"], [type="submit"]) { 490 appearance: auto; 491 -moz-default-appearance: button; 492 /* The sum of border and padding on block-start and block-end 493 must be the same here, for text inputs, and for <select>. */ 494 padding-block: 1px; 495 padding-inline: 8px; 496 border: 2px outset ButtonBorder; 497 background-color: ButtonFace; 498 cursor: default; 499 box-sizing: border-box; 500 user-select: none; 501 break-inside: avoid; 502 } 503 504 /* Text-related properties for buttons: these ones are not shared with 505 input[type=color] */ 506 button, 507 ::file-selector-button, 508 input:is([type="reset"], [type="button"], [type="submit"]) { 509 color: ButtonText; 510 font: -moz-button; 511 white-space: pre; 512 text-align: center; 513 padding-inline: 4px; 514 } 515 516 input[type="color"] { 517 inline-size: 64px; 518 block-size: 32px; 519 padding: 4px; 520 } 521 522 /* https://github.com/whatwg/html/issues/9976 */ 523 input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) { 524 overflow: clip !important; 525 overflow-clip-margin: 0 !important; 526 } 527 528 button, 529 ::file-selector-button { 530 /* Buttons should lay out like "normal" html, mostly */ 531 white-space: unset; 532 /* But no text-decoration reaching inside, by default */ 533 display: inline-block; 534 } 535 536 ::file-selector-button:hover, 537 button:hover, 538 input:is([type="reset"], [type="button"], [type="submit"], [type="color"]):hover { 539 color: -moz-buttonhovertext; 540 border-color: -moz-buttonhoverborder; 541 background-color: -moz-buttonhoverface; 542 } 543 544 ::file-selector-button:active:hover, 545 button:active:hover, 546 input:is([type="reset"], [type="button"], [type="submit"], [type="color"]):active:hover { 547 border-style: inset; 548 border-color: -moz-buttonactiveborder; 549 color: -moz-buttonactivetext; 550 background-color: -moz-buttonactiveface; 551 } 552 553 :is(:disabled, :disabled:active)::file-selector-button, 554 button:is(:disabled, :disabled:active), 555 input:is([type="reset"], [type="button"], [type="submit"], [type="color"]):is(:disabled, :disabled:active), 556 select:is(:disabled, :disabled:active) > button { 557 border-style: outset; 558 cursor: unset; 559 } 560 561 :is(:disabled, :disabled:active)::file-selector-button, 562 button:is(:disabled, :disabled:active), 563 input:is([type="reset"], [type="button"], [type="submit"]):is(:disabled, :disabled:active), 564 select:is(:disabled, :disabled:active) > button { 565 color: GrayText; 566 background-color: -moz-ButtonDisabledFace; 567 } 568 569 /* file selector */ 570 input[type="file"] { 571 white-space: nowrap !important; 572 color: unset; 573 574 /* Revert rules which apply on all inputs. */ 575 appearance: none; 576 -moz-default-appearance: none; 577 cursor: default; 578 579 border: none; 580 background-color: transparent; 581 padding: unset; 582 } 583 584 input[type="file"] > label { 585 display: inline-block; 586 min-inline-size: 12em; 587 text-align: match-parent; 588 589 cursor: unset; 590 user-select: none; 591 unicode-bidi: plaintext; 592 } 593 594 /* button part of file selector */ 595 ::file-selector-button { 596 font-size: unset; 597 letter-spacing: unset; 598 cursor: unset; 599 margin-inline-end: 5px; 600 } 601 602 /* 603 * Make form controls inherit 'unicode-bidi' transparently as required by 604 * their various anonymous descendants and pseudo-elements: 605 * 606 * <textarea> and <input type=text>: 607 * inherit into the scroll frame with pseudo ::-moz-text-control-editing-root 608 * which is a (direct or indirect) child of the text control. 609 * 610 * <select>: 611 * inherit into the label and the <optgroup>'s ':before' pseudo-element, 612 * which is where the label of the <optgroup> gets displayed. The <option>s 613 * don't use anonymous boxes, so they need no special rules. 614 */ 615 ::placeholder, 616 ::-moz-text-control-editing-root, 617 select > label, 618 optgroup::before { 619 unicode-bidi: inherit; 620 text-overflow: inherit; 621 } 622 623 progress { 624 appearance: auto; 625 -moz-default-appearance: progress-bar; 626 display: inline-block; 627 vertical-align: -0.2em; 628 629 /* Default style in case of there is appearance: none; */ 630 border: 1px solid ThreeDShadow; 631 border-right-color: ThreeDHighlight; 632 border-bottom-color: ThreeDHighlight; 633 /* #e6e6e6 is a light gray. */ 634 background-color: #e6e6e6; 635 overflow: clip; 636 } 637 638 progress::-moz-progress-bar, 639 progress::slider-fill { 640 /* Prevent styling that would change the type of frame we construct. */ 641 display: inline-block !important; 642 float: none !important; 643 position: static !important; 644 overflow: visible !important; 645 box-sizing: border-box !important; 646 647 height: 100%; 648 width: 100%; 649 650 /* Default style in case of there is appearance: none; */ 651 background-color: #0064b4; /* blue */ 652 } 653 654 meter { 655 appearance: auto; 656 -moz-default-appearance: meter; 657 display: inline-block; 658 vertical-align: -0.2em; 659 background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%); 660 overflow: clip; 661 } 662 663 meter::-moz-meter-bar, 664 meter::slider-fill { 665 /* Block styles that would change the type of frame we construct. */ 666 display: inline-block !important; 667 float: none !important; 668 position: static !important; 669 overflow: visible !important; 670 671 height: 100%; 672 width: 100%; 673 } 674 675 meter:-moz-meter-optimum::-moz-meter-bar, 676 meter:-moz-meter-optimum::slider-fill { 677 /* green. */ 678 background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%); 679 } 680 meter:-moz-meter-sub-optimum::-moz-meter-bar, 681 meter:-moz-meter-sub-optimum::slider-fill { 682 /* orange. */ 683 background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%); 684 } 685 meter:-moz-meter-sub-sub-optimum::-moz-meter-bar, 686 meter:-moz-meter-sub-sub-optimum::slider-fill { 687 /* red. */ 688 background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%); 689 } 690 691 input[type="range"] { 692 appearance: auto; 693 -moz-default-appearance: range; 694 margin: 2px; 695 /* Override some rules that apply on all input types: */ 696 cursor: default; 697 padding: unset; 698 border: unset; 699 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */ 700 user-select: none !important; 701 } 702 703 /** 704 * Layout handles positioning of this pseudo-element specially (so that content 705 * authors can concentrate on styling the thumb without worrying about the 706 * logic to position it). Specifically the 'margin', 'top' and 'left' 707 * properties are ignored. 708 * 709 * If content authors want to have a vertical range, they will also need to 710 * set the width/height of this pseudo-element. 711 * 712 * TODO(emilio, bug 1663819): Losen these restrictions once these 713 * pseudo-elements are better spec'd out. 714 */ 715 input[type="range"]::-moz-range-track, 716 input[type="range"]::slider-track { 717 /* Prevent styling that would change the type of frame we construct. */ 718 display: block !important; 719 float: none !important; 720 position: static !important; 721 writing-mode: unset !important; 722 direction: unset !important; 723 block-size: 0.2em; /* same as inline-size below */ 724 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */ 725 user-select: none !important; 726 } 727 728 input[type="range"][orient="vertical"]::-moz-range-track, 729 input[type="range"][orient="vertical"]::slider-track { 730 inline-size: 0.2em; /* same as block-size above */ 731 block-size: 100%; 732 } 733 734 /** 735 * Layout handles positioning of this pseudo-element specially (so that content 736 * authors can concentrate on styling this pseudo-element without worrying 737 * about the logic to position it). Specifically the 'margin', 'top' and 'left' 738 * properties are ignored. Additionally, if the range is horizontal, the width 739 * property is ignored, and if the range range is vertical, the height property 740 * is ignored. 741 */ 742 input[type="range"]::-moz-range-progress, 743 input[type="range"]::slider-fill { 744 /* Prevent styling that would change the type of frame we construct. */ 745 display: block !important; 746 float: none !important; 747 position: static !important; 748 writing-mode: unset !important; 749 direction: unset !important; 750 /* Since one of width/height will be ignored, this just sets the "other" 751 dimension. */ 752 width: 0.2em; 753 height: 0.2em; 754 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */ 755 user-select: none !important; 756 } 757 758 /** 759 * Layout handles positioning of this pseudo-element specially (so that content 760 * authors can concentrate on styling the thumb without worrying about the 761 * logic to position it). Specifically the 'margin', 'top' and 'left' 762 * properties are ignored. 763 */ 764 input[type="range"]::-moz-range-thumb, 765 input[type="range"]::slider-thumb { 766 /* Prevent styling that would change the type of frame we construct. */ 767 display: block !important; 768 float: none !important; 769 position: static !important; 770 writing-mode: unset !important; 771 direction: unset !important; 772 773 width: 1em; 774 height: 1em; 775 border: 0.1em solid #999; 776 border-radius: 0.5em; 777 background-color: #f0f0f0; 778 /* Prevent nsIFrame::HandlePress setting mouse capture to this element. */ 779 user-select: none !important; 780 } 781 782 input[type="number"] { 783 -moz-default-appearance: number-input; 784 } 785 786 input[type="number"]::-moz-number-spin-box { 787 writing-mode: horizontal-tb; 788 display: flex; 789 flex-direction: column; 790 width: max-content; 791 align-self: center; 792 justify-content: center; 793 /* Don't allow the spin buttons to create overflow */ 794 max-height: 100%; 795 max-width: 100%; 796 overflow: clip; 797 } 798 799 input[type="number"]::-moz-number-spin-up, 800 input[type="number"]::-moz-number-spin-down { 801 writing-mode: horizontal-tb; 802 appearance: auto; 803 -moz-default-appearance: spinner-upbutton; 804 display: block; /* bug 926670 */ 805 flex-grow: 1; 806 cursor: default; 807 } 808 809 input[type="number"]::-moz-number-spin-down { 810 -moz-default-appearance: spinner-downbutton; 811 } 812 813 input::-moz-search-clear-button, 814 input::-moz-reveal { 815 display: block; 816 cursor: default; 817 -moz-user-focus: none; 818 width: 1em; 819 height: 1em; 820 margin-inline: 1px; 821 background-image: url(resource://content-accessible/close-12.svg); 822 background-repeat: no-repeat; 823 background-position: center; 824 background-size: contain; 825 -moz-context-properties: fill; 826 fill: currentColor; 827 } 828 829 input::-moz-search-clear-button { 830 background-size: 1em; 831 padding: 0.35em; 832 border-radius: 4px; 833 margin-inline: 1px; 834 } 835 836 input::-moz-search-clear-button:hover { 837 background-color: color-mix(in srgb, currentColor 17%, transparent); 838 } 839 840 input::-moz-search-clear-button:active { 841 background-color: color-mix(in srgb, currentColor 30%, transparent); 842 } 843 844 @media (forced-colors) { 845 input::-moz-search-clear-button { 846 outline: 1px solid ButtonText; 847 outline-offset: -1px; 848 color: ButtonText; 849 background-color: ButtonFace; 850 } 851 852 input::-moz-search-clear-button:hover { 853 color: SelectedItem; 854 background-color: SelectedItemText; 855 outline-color: SelectedItem; 856 } 857 858 input::-moz-search-clear-button:active { 859 color: SelectedItem; 860 background-color: SelectedItemText; 861 outline-color: ButtonText; 862 } 863 } 864 865 input::-moz-reveal { 866 /* Needed to prevent regression of Bug 502258 */ 867 max-height: 100%; 868 max-width: 100%; 869 background-image: url("chrome://global/skin/icons/eye.svg"); 870 } 871 872 input:-moz-revealed::-moz-reveal { 873 background-image: url("chrome://global/skin/icons/eye-slash.svg"); 874 } 875 876 input:-moz-value-empty::-moz-reveal, 877 input:-moz-value-empty::-moz-search-clear-button { 878 visibility: hidden; 879 } 880 881 input:is([type="date"], [type="time"], [type="datetime-local"]) { 882 font-family: -moz-fixed; 883 cursor: default; 884 } 885 886 input:is([type="date"], [type="time"], [type="datetime-local"]):is(:disabled, :read-only) { 887 color: GrayText; 888 } 889 890 input:autofill, 891 select:autofill, 892 textarea:autofill { 893 background-color: -moz-autofill-background !important; 894 background-image: none !important; 895 color: FieldText !important; 896 }