-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path_download-button.scss
More file actions
336 lines (282 loc) · 7.88 KB
/
_download-button.scss
File metadata and controls
336 lines (282 loc) · 7.88 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
// 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 https://mozilla.org/MPL/2.0/.
@use '~@mozilla-protocol/core/protocol/css/includes/lib' as *;
// download button and related containers
ul.download-list {
list-style-type: none;
margin-bottom: 10px;
li {
margin-left: 0;
}
strong {
font-weight: bold;
}
}
.download-dumb {
ul {
list-style: none;
li {
display: inline-block;
margin: 20px 0 0;
.button {
@include text-body-sm;
margin-left: 3px;
padding: 6px 10px;
}
}
}
}
.download-other {
@include text-body-xs;
color: #666;
a:link,
a:visited {
color: #999;
}
a:hover,
a:focus,
a:active {
color: #999;
text-decoration: underline;
}
}
/* !important used for strict download link enforcement */
/* stylelint-disable declaration-no-important, selector-class-pattern */
// Product download buttons
.download-button {
display: inline-block;
vertical-align: top;
.ios-download,
.unrecognized-download,
.nojs-download {
display: none;
}
}
// OS detection
.download-button .os_win64,
.download-button .os_win64-msi,
.download-button .os_win64-aarch64,
.download-button .os_linux,
.download-button .os_linux64,
.download-button .os_linux64-aarch64,
.android .download-button-desktop,
.download-button .os_win,
.download-button .os_win-msi,
.download-button .os_osx,
.download-button .os_android,
.download-button .os_ios,
.no-js .download-list,
.other .download-list {
display: none !important;
}
.linux .download-button .os_linux,
.linux .download-button .os_linux64,
.linux .download-button .os_linux64-aarch64,
.windows .download-button .os_win,
.osx .download-button .os_osx,
.android .download-button .os_android,
.download-button-android .os_android,
.android .download-button-desktop .download-list,
.download-button-ios .os_ios,
.ios .download-button .os_ios,
.ios .download-button .ios-download,
.ios .download-button-desktop .download-list,
.other .download-button-android .download-list {
display: block !important;
}
.windows .force-win64 .os_win,
.windows .force-win64-aarch64 .os_win {
display: none !important;
}
.windows .force-win64 .os_win64 {
display: block !important;
}
.windows .force-win64-aarch64 .os_win64-aarch64 {
display: block !important;
}
// add spacing between displayed buttons
.download-list {
display: grid;
gap: $spacing-md;
}
// 64-bit UA detection for Firefox Beta on Windows (issue #10194)
.windows.x64 .download-button-beta .os_win {
display: none !important;
}
.windows.x64 .download-button-beta .os_win64 {
display: block !important;
}
.download-list .linux {
margin-bottom: $spacing-md;
}
// Platform specific Firefox download macros (bedrock issue #12192)
.firefox-platform-button {
.download-link.os_linux64 {
margin-bottom: $spacing-sm; // allow spacing between macro Linux buttons ('download-list' buttons get spacing from grid)
}
.linux & {
.download-link.os_linux64,
.download-link.os_linux64-aarch64 {
display: inline-block;
}
}
.c-linux-debian {
margin-top: $spacing-md;
br {
display: none;
}
@media #{$mq-md} {
br {
display: inline;
}
}
}
}
// All linux download links (issue 648)
.linux {
.download-link {
text-wrap: balance; // TODO: update with https://github.com/mozilla/protocol/issues/1119
}
}
// Conditional Firefox download buttons on unsupported
// operating system versions (issue #13317)
.fx-unsupported-message {
display: none !important;
text-align: center;
.fx-unsupported-message-all-link {
@include text-body-xs;
display: block;
margin-top: $spacing-md;
a:link,
a:visited {
color: inherit;
text-decoration: none;
}
a:hover,
a:active,
a:focus {
text-decoration: underline;
}
}
.download-link {
text-align: center;
}
}
// Split component styling
.fx-unsupported .mzp-c-split {
.fx-unsupported-message,
.fx-privacy-link,
.mzp-c-button-download-privacy-link {
@include bidi(((text-align, left, right),));
}
}
.fx-unsupported .mzp-c-split.mzp-l-split-center-on-sm-md {
.fx-unsupported-message,
.fx-privacy-link,
.mzp-c-button-download-privacy-link {
text-align: center;
}
@media #{$mq-md} {
.fx-unsupported-message,
.fx-privacy-link,
.mzp-c-button-download-privacy-link {
@include bidi(((text-align, left, right),));
}
}
}
// Callout styling
.fx-unsupported .mzp-c-callout-compact {
.fx-unsupported-message,
.fx-privacy-link,
.mzp-c-button-download-privacy-link {
@include bidi(((text-align, left, right),));
}
}
.windows.fx-unsupported,
.osx.fx-unsupported {
// Hide Firefox desktop download buttons
.c-button-download-thanks-link,
.download-button .download-list {
display: none !important;
}
// Keep showing Firefox mobile download buttons
.download-button-android .download-list,
.download-button-ios .download-list {
display: block !important;
}
// Hide Firefox download button in the navigation as there's
// too little space to display messaging.
.c-navigation .c-navigation-shoulder .c-button-download-thanks {
display: none !important;
}
// Hide Firefox Win64 ESR download button by default.
.fx-unsupported-message.win .download-link.os_win64 {
display: none !important;
}
}
.windows.fx-unsupported {
// Show unsupported message with Firefox ESR download button.
.download-button .fx-unsupported-message.win,
.c-button-download-thanks .fx-unsupported-message.win,
.firefox-platform-button-windows .fx-unsupported-message.win {
display: block !important;
}
// Show Firefox Win32 ESR download buttons for 64-bit CPUs.
.fx-unsupported-message.win .download-link.os_win {
display: inline-block !important;
}
// Hide Windows platform specific buttons.
.firefox-platform-button-windows .firefox-platform-button {
display: none;
}
&.x64 {
// Show Firefox Win64 ESR download buttons for 64-bit CPUs.
.fx-unsupported-message.win .download-link.os_win64 {
display: inline-block !important;
}
// Hide Firefox Win32 ESR download buttons for 64-bit CPUs.
.fx-unsupported-message.win .download-link.os_win {
display: none !important;
}
}
}
.osx.fx-unsupported {
// Show unsupported message with Firefox ESR download button.
.download-button .fx-unsupported-message.mac,
.c-button-download-thanks .fx-unsupported-message.mac,
.firefox-platform-button-mac .fx-unsupported-message.mac {
display: block !important;
}
// Hide Mac platform specific buttons.
.firefox-platform-button-mac .firefox-platform-button {
display: none;
}
}
.android .download-button-desktop,
.ios .download-button-desktop,
.no-js .download-button {
.nojs-download {
display: block;
}
}
.other .download-button {
.unrecognized-download {
display: block;
}
}
/* stylelint-enable */
/* Microsoft Store badge */
.download-ms-store-badge {
display: inline-block;
.ms-store-badge-img {
margin: 0
}
}
// Download Icon
// Hack to ensure only component authored margin is applied
// https://github.com/mozmeao/springfield/pull/238#issuecomment-2954261185
.download-link .mzp-c-button-icon-end img {
/* stylelint-disable-next-line declaration-no-important */
margin-bottom: 0 !important;
}