-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.css
More file actions
219 lines (190 loc) · 4.73 KB
/
status.css
File metadata and controls
219 lines (190 loc) · 4.73 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/* 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/. */
@import url('chrome://global/skin/in-content/common.css');
/* Firefox 70 introduced .card-no-hover so we fake it before then.
* See https://hg.mozilla.org/mozilla-central/rev/bbde5a300f43 */
.fxlt70 .card.card-no-hover:hover {
box-shadow: var(--card-shadow);
}
main {
margin-top: 3em;
margin-left: auto;
margin-right: auto;
max-width: 44em;
padding-left: 2em;
padding-right: 2em;
}
.error-message {
background-color: var(--yellow-50);
color: var(--yellow-90);
}
@media (prefers-color-scheme: dark) {
.dark-mode .error-message {
background-color: var(--yellow-80);
color: var(--in-content-text-color);
}
}
ol {
padding-left: calc(16px + 1ex);
}
li {
margin-bottom: 0.5em;
list-style: none;
line-height: 1.2;
}
li::before {
margin-left: calc(-16px - 1ex);
margin-right: 1ex;
width: 16px;
height: 16px;
vertical-align: top;
margin-top: calc(1.2em - 16px);
display: inline-block;
}
li[data-status='enqueued']::before {
content: url('More.svg');
}
@media (prefers-color-scheme: dark) {
.dark-mode li[data-status='enqueued']::before {
content: url('More-dark.svg');
}
}
li[data-status='loading']::before {
content: url('tab-loading.png');
}
li[data-status='complete']::before {
content: url('Check.svg');
}
@media (prefers-color-scheme: dark) {
.dark-mode li[data-status='complete']::before {
content: url('Check-dark.svg');
}
}
li[data-status='error']::before {
content: url('Warning.svg');
}
@media (prefers-color-scheme: dark) {
.dark-mode li[data-status='error']::before {
content: url('Warning-dark.svg');
}
}
li.reload::before {
content: url('Refresh.svg');
animation-name: reload-flourish;
animation-duration: 1700ms;
animation-timing-function: cubic-bezier(0, 0, 0.8, 1);
}
@media (prefers-color-scheme: dark) {
.dark-mode li.reload::before {
content: url('Refresh-dark.svg');
}
}
@keyframes reload-flourish {
0% {
transform: rotate(-0.85turn);
}
100% {
transform: rotate(0turn);
}
}
#heading {
display: flex;
align-items: baseline;
justify-content: space-between;
}
#prefs {
min-width: 0;
min-height: 0;
width: 32px;
height: 32px;
margin-right: 0;
padding: 0;
/* Align this button's bottom edge with the baseline of the heading. The
* button has no child element, so its baseline is in the middle and it
* needs to be shifted up by 50% of the button's height. */
position: relative;
top: -16px;
background-image: url(Preferences.svg);
background-repeat: no-repeat;
background-position: center;
}
@media (prefers-color-scheme: dark) {
.dark-mode #prefs {
background-image: url(Preferences-dark.svg);
}
}
#status {
display: grid;
max-width: 30em;
margin-left: auto;
margin-right: auto;
}
#status h2 {
margin: 0;
font-weight: normal;
line-height: 1.4;
}
#status.success h2::before {
content: url('Check.svg');
margin-right: 1ex;
height: 1em;
vertical-align: top;
/* (line-height - height) / 2 */
margin-top: calc((1.4em - 1em) / 2);
}
@media (prefers-color-scheme: dark) {
.dark-mode #status.success h2::before {
content: url('Check-dark.svg');
}
}
#pause {
grid-column: 2;
justify-self: end;
margin-left: 1em;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
}
#pause.finished {
opacity: 0;
transition: opacity linear 1s;
}
#status.success #pause {
display: none;
}
#progress {
display: block;
width: 100%;
height: 100%;
box-sizing: border-box;
}
/* On some platforms, the height of a progress bar can't be reduced to 0, so we
* have to wrap it in an overflow:hidden container to make the slide-closed
* animation work.
*/
#progress-container {
grid-column: 1 / span 2;
display: block;
overflow: hidden;
width: 100%;
/* To avoid weird rounding in the delay before the animation, height must
* compute to an integer in px; 0.6em @ font-size:15px = 9.0px */
height: 0.6em;
margin-top: 0.6em;
}
.os-win #progress-container {
/* On Windows 10, the minimum height at which the progress bar looks okay
* is 10px. 0.8em @ font-size:15px = 12px */
height: 0.8em;
}
#status.success #progress-container {
height: 0;
margin-top: 0;
transition: height 0.5s ease-in 1s, margin-top 0.5s ease-out 1.5s;
}
@media (prefers-reduced-motion: reduce) {
#status.success #progress-container {
transition: none;
}
}