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