textrecognition.css (3111B)
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 .textRecognitionText { 6 overflow-y: auto; 7 max-height: 300px; 8 flex: 1; 9 display: none; 10 } 11 12 .textRecognitionText p:first-child { 13 margin-top: 0; 14 } 15 16 .textRecognitionText p:last-child { 17 margin-bottom: 0; 18 } 19 20 .textRecognition { 21 --gap: 16px; 22 display: flex; 23 flex-direction: column; 24 background-color: var(--background-color-canvas); 25 width: 412px; 26 gap: var(--gap) 0; 27 padding-block: var(--gap); 28 } 29 30 .textRecognition > * { 31 padding-inline: var(--gap); 32 } 33 34 .textRecognitionHeader { 35 font-weight: var(--font-weight-bold); 36 display: flex; 37 flex-direction: row; 38 align-items: center; 39 } 40 41 .textRecognitionFooter { 42 text-align: end; 43 } 44 45 .textRecognitionThrobber { 46 display: inline-block; 47 width: 16px; 48 height: 16px; 49 position: relative; 50 overflow: hidden; 51 margin-inline-end: 5.5px; 52 } 53 54 @media (prefers-reduced-motion: no-preference) { 55 .textRecognitionThrobber::before { 56 content: ""; 57 position: absolute; 58 background-image: url("chrome://browser/skin/tabbrowser/loading.svg"); 59 background-position: left center; 60 background-repeat: no-repeat; 61 width: 480px; 62 height: 100%; 63 animation: throbber-animation-ltr 1.05s steps(30) infinite; 64 -moz-context-properties: fill; 65 fill: currentColor; 66 opacity: 0.7; 67 } 68 69 .textRecognitionThrobber:dir(rtl)::before { 70 background-position-x: right; 71 animation: throbber-animation-rtl 1.05s steps(30) infinite; 72 } 73 } 74 75 @media (prefers-reduced-motion: reduce) { 76 .textRecognitionThrobber { 77 background-image: url("chrome://global/skin/icons/loading.svg"); 78 background-position: center; 79 background-repeat: no-repeat; 80 -moz-context-properties: fill; 81 fill: currentColor; 82 } 83 } 84 85 .textRecognitionSuccessIcon { 86 display: inline-block; 87 background-color: #2ac3a2; 88 border: 3px solid #2ac3a2; 89 fill: var(--background-color-canvas); 90 -moz-context-properties: fill; 91 border-radius: 10px; 92 width: 12px; 93 height: 12px; 94 margin-inline-end: 6px; 95 } 96 97 @media (prefers-reduced-motion: no-preference) { 98 .textRecognitionSuccessIcon { 99 animation: success-animation 0.3s cubic-bezier(0.3, 2, 0.48, 0.94); 100 } 101 } 102 103 .textRecognitionNoResultIcon { 104 display: inline-block; 105 fill: #ffbf00; 106 -moz-context-properties: fill; 107 width: 18px; 108 height: 18px; 109 margin-inline-end: 8px; 110 } 111 112 @media (prefers-contrast) { 113 .textRecognitionSuccessIcon { 114 background-color: currentColor; 115 border-color: currentColor; 116 fill: var(--background-color-canvas); 117 } 118 119 .textRecognitionNoResultIcon { 120 fill: currentColor; 121 } 122 } 123 124 @keyframes throbber-animation-ltr { 125 0% { 126 transform: translateX(0); 127 } 128 100% { 129 transform: translateX(-100%); 130 } 131 } 132 133 @keyframes throbber-animation-rtl { 134 0% { 135 transform: translateX(0); 136 } 137 100% { 138 transform: translateX(100%); 139 } 140 } 141 142 @keyframes success-animation { 143 0% { 144 transform: scale(0); 145 opacity: 0; 146 } 147 100% { 148 transform: scale(1); 149 opacity: 1; 150 } 151 }