@skyscanner/backpack-web 38.21.0 → 39.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-component-skeleton/index.d.ts +1 -1
- package/bpk-component-skeleton/index.js +1 -1
- package/bpk-component-skeleton/src/BpkSkeleton.js +3 -2
- package/bpk-component-skeleton/src/BpkSkeleton.module.css +1 -1
- package/bpk-component-skeleton/src/common-types.d.ts +7 -0
- package/bpk-component-skeleton/src/common-types.js +4 -0
- package/bpk-mixins/_badges-v2.scss +37 -36
- package/bpk-mixins/_badges.scss +37 -36
- package/bpk-mixins/_borders.scss +16 -16
- package/bpk-mixins/_breakpoints.scss +11 -11
- package/bpk-mixins/_buttons.scss +141 -137
- package/bpk-mixins/_cards.scss +13 -13
- package/bpk-mixins/_chips.scss +66 -66
- package/bpk-mixins/_forms.scss +214 -202
- package/bpk-mixins/_icons.scss +7 -4
- package/bpk-mixins/_index.scss +19 -19
- package/bpk-mixins/_layers.scss +34 -34
- package/bpk-mixins/_margins.scss +3 -3
- package/bpk-mixins/_panels.scss +9 -9
- package/bpk-mixins/_radii.scss +6 -6
- package/bpk-mixins/_scroll-indicators.scss +2 -2
- package/bpk-mixins/_shadows.scss +4 -4
- package/bpk-mixins/_spinners.scss +10 -10
- package/bpk-mixins/_tokens.scss +1 -3
- package/bpk-mixins/_typography.scss +204 -195
- package/bpk-mixins/_utils.scss +17 -12
- package/bpk-stylesheets/index.scss +13 -14
- package/bpk-stylesheets/normalize.css +18 -422
- package/bpk-stylesheets/normalize.scss +422 -0
- package/package.json +2 -6
- package/unstable__bpk-mixins/_badges-v2.scss +0 -240
- package/unstable__bpk-mixins/_badges.scss +0 -240
- package/unstable__bpk-mixins/_borders.scss +0 -268
- package/unstable__bpk-mixins/_breakpoints.scss +0 -221
- package/unstable__bpk-mixins/_buttons.scss +0 -587
- package/unstable__bpk-mixins/_cards.scss +0 -94
- package/unstable__bpk-mixins/_chips.scss +0 -249
- package/unstable__bpk-mixins/_forms.scss +0 -1045
- package/unstable__bpk-mixins/_icons.scss +0 -88
- package/unstable__bpk-mixins/_index.scss +0 -38
- package/unstable__bpk-mixins/_layers.scss +0 -199
- package/unstable__bpk-mixins/_margins.scss +0 -75
- package/unstable__bpk-mixins/_panels.scss +0 -96
- package/unstable__bpk-mixins/_radii.scss +0 -80
- package/unstable__bpk-mixins/_scroll-indicators.scss +0 -79
- package/unstable__bpk-mixins/_shadows.scss +0 -58
- package/unstable__bpk-mixins/_spinners.scss +0 -102
- package/unstable__bpk-mixins/_tokens.scss +0 -19
- package/unstable__bpk-mixins/_typography.scss +0 -1225
- package/unstable__bpk-mixins/_utils.scss +0 -267
|
@@ -1,587 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Backpack - Skyscanner's Design System
|
|
3
|
-
*
|
|
4
|
-
* Copyright 2016 Skyscanner Ltd
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/* stylelint-disable at-rule-disallowed-list */
|
|
20
|
-
|
|
21
|
-
@use 'tokens.scss';
|
|
22
|
-
@use 'typography.scss';
|
|
23
|
-
@use 'utils.scss';
|
|
24
|
-
|
|
25
|
-
////
|
|
26
|
-
/// @group buttons
|
|
27
|
-
////
|
|
28
|
-
|
|
29
|
-
/// Standard button.
|
|
30
|
-
///
|
|
31
|
-
/// @example scss
|
|
32
|
-
/// .selector {
|
|
33
|
-
/// @include bpk-button();
|
|
34
|
-
/// }
|
|
35
|
-
|
|
36
|
-
@mixin bpk-button {
|
|
37
|
-
display: inline-block;
|
|
38
|
-
min-height: tokens.$bpk-button-height;
|
|
39
|
-
margin: 0;
|
|
40
|
-
padding: (6 * tokens.$bpk-one-pixel-rem) tokens.bpk-spacing-base();
|
|
41
|
-
border: 0;
|
|
42
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
43
|
-
text-align: center;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
vertical-align: middle;
|
|
47
|
-
user-select: none;
|
|
48
|
-
|
|
49
|
-
@include typography.bpk-label-1;
|
|
50
|
-
@include utils.bpk-themeable-property(
|
|
51
|
-
color,
|
|
52
|
-
--bpk-button-primary-text-color,
|
|
53
|
-
tokens.$bpk-text-on-dark-day
|
|
54
|
-
);
|
|
55
|
-
@include utils.bpk-themeable-property(
|
|
56
|
-
background-color,
|
|
57
|
-
--bpk-button-primary-background-color,
|
|
58
|
-
tokens.$bpk-private-button-primary-normal-background-day
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
@include utils.bpk-hover {
|
|
62
|
-
@include utils.bpk-themeable-property(
|
|
63
|
-
color,
|
|
64
|
-
--bpk-button-primary-hover-text-color,
|
|
65
|
-
tokens.$bpk-text-on-dark-day
|
|
66
|
-
);
|
|
67
|
-
@include utils.bpk-themeable-property(
|
|
68
|
-
background-color,
|
|
69
|
-
--bpk-button-primary-hover-background-color,
|
|
70
|
-
tokens.$bpk-private-button-primary-pressed-background-day
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:active {
|
|
75
|
-
@include utils.bpk-themeable-property(
|
|
76
|
-
color,
|
|
77
|
-
--bpk-button-primary-active-text-color,
|
|
78
|
-
tokens.$bpk-text-on-dark-day
|
|
79
|
-
);
|
|
80
|
-
@include utils.bpk-themeable-property(
|
|
81
|
-
background-color,
|
|
82
|
-
--bpk-button-primary-active-background-color,
|
|
83
|
-
tokens.$bpk-private-button-primary-pressed-background-day
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:disabled {
|
|
88
|
-
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
89
|
-
color: tokens.$bpk-text-disabled-day;
|
|
90
|
-
cursor: not-allowed;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/// Large button. Modifies the bpk-button mixin.
|
|
95
|
-
///
|
|
96
|
-
/// @require {mixin} bpk-button
|
|
97
|
-
///
|
|
98
|
-
/// @example scss
|
|
99
|
-
/// .selector {
|
|
100
|
-
/// @include bpk-button();
|
|
101
|
-
/// @include bpk-button--large();
|
|
102
|
-
/// }
|
|
103
|
-
|
|
104
|
-
@mixin bpk-button--large {
|
|
105
|
-
min-height: tokens.$bpk-button-large-height;
|
|
106
|
-
padding: (12 * tokens.$bpk-one-pixel-rem) tokens.bpk-spacing-base();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/// PrimaryOnDark button. Modifies the bpk-button mixin.
|
|
110
|
-
///
|
|
111
|
-
/// @require {mixin} bpk-button
|
|
112
|
-
///
|
|
113
|
-
/// @example scss
|
|
114
|
-
/// .selector {
|
|
115
|
-
/// @include bpk-button();
|
|
116
|
-
/// @include bpk-button--primary-on-dark();
|
|
117
|
-
/// }
|
|
118
|
-
|
|
119
|
-
@mixin bpk-button--primary-on-dark {
|
|
120
|
-
@include utils.bpk-themeable-property(
|
|
121
|
-
color,
|
|
122
|
-
--bpk-button-primary-on-dark-text-color,
|
|
123
|
-
tokens.$bpk-text-on-light-day
|
|
124
|
-
);
|
|
125
|
-
@include utils.bpk-themeable-property(
|
|
126
|
-
background-color,
|
|
127
|
-
--bpk-button-primary-on-dark-background-color,
|
|
128
|
-
tokens.$bpk-private-button-primary-on-dark-normal-background-day
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
@include utils.bpk-hover {
|
|
132
|
-
@include utils.bpk-themeable-property(
|
|
133
|
-
color,
|
|
134
|
-
--bpk-button-primary-on-dark-hover-text-color,
|
|
135
|
-
tokens.$bpk-text-on-light-day
|
|
136
|
-
);
|
|
137
|
-
@include utils.bpk-themeable-property(
|
|
138
|
-
background-color,
|
|
139
|
-
--bpk-button-primary-on-dark-hover-background-color,
|
|
140
|
-
tokens.$bpk-private-button-primary-on-dark-pressed-background-day
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&:active {
|
|
145
|
-
@include utils.bpk-themeable-property(
|
|
146
|
-
color,
|
|
147
|
-
--bpk-button-primary-on-dark-active-text-color,
|
|
148
|
-
tokens.$bpk-text-on-light-day
|
|
149
|
-
);
|
|
150
|
-
@include utils.bpk-themeable-property(
|
|
151
|
-
background-color,
|
|
152
|
-
--bpk-button-primary-on-dark-active-background-color,
|
|
153
|
-
tokens.$bpk-private-button-primary-on-dark-pressed-background-day
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&:disabled {
|
|
158
|
-
background-color: tokens.$bpk-private-button-primary-on-dark-disabled-background-day;
|
|
159
|
-
color: tokens.$bpk-private-button-primary-on-dark-disabled-foreground-day;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/// PrimaryOnLight button. Modifies the bpk-button mixin.
|
|
164
|
-
///
|
|
165
|
-
/// @require {mixin} bpk-button
|
|
166
|
-
///
|
|
167
|
-
/// @example scss
|
|
168
|
-
/// .selector {
|
|
169
|
-
/// @include bpk-button();
|
|
170
|
-
/// @include bpk-button--primary-on-light();
|
|
171
|
-
/// }
|
|
172
|
-
|
|
173
|
-
@mixin bpk-button--primary-on-light {
|
|
174
|
-
@include utils.bpk-themeable-property(
|
|
175
|
-
color,
|
|
176
|
-
--bpk-button-primary-on-light-text-color,
|
|
177
|
-
tokens.$bpk-text-on-dark-night
|
|
178
|
-
);
|
|
179
|
-
@include utils.bpk-themeable-property(
|
|
180
|
-
background-color,
|
|
181
|
-
--bpk-button-primary-on-light-background-color,
|
|
182
|
-
tokens.$bpk-private-button-primary-on-light-normal-background-day
|
|
183
|
-
);
|
|
184
|
-
|
|
185
|
-
@include utils.bpk-hover {
|
|
186
|
-
@include utils.bpk-themeable-property(
|
|
187
|
-
color,
|
|
188
|
-
--bpk-button-primary-on-light-hover-text-color,
|
|
189
|
-
tokens.$bpk-text-on-dark-night
|
|
190
|
-
);
|
|
191
|
-
@include utils.bpk-themeable-property(
|
|
192
|
-
background-color,
|
|
193
|
-
--bpk-button-primary-on-light-hover-background-color,
|
|
194
|
-
tokens.$bpk-private-button-primary-on-light-pressed-background-day
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&:active {
|
|
199
|
-
@include utils.bpk-themeable-property(
|
|
200
|
-
color,
|
|
201
|
-
--bpk-button-primary-on-light-active-text-color,
|
|
202
|
-
tokens.$bpk-text-on-dark-night
|
|
203
|
-
);
|
|
204
|
-
@include utils.bpk-themeable-property(
|
|
205
|
-
background-color,
|
|
206
|
-
--bpk-button-primary-on-light-active-background-color,
|
|
207
|
-
tokens.$bpk-private-button-primary-on-light-pressed-background-day
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
&:disabled {
|
|
212
|
-
background-color: tokens.$bpk-private-button-primary-on-light-disabled-background-day;
|
|
213
|
-
color: tokens.$bpk-private-button-primary-on-light-disabled-foreground-day;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/// Secondary button. Modifies the bpk-button mixin.
|
|
218
|
-
///
|
|
219
|
-
/// @require {mixin} bpk-button
|
|
220
|
-
///
|
|
221
|
-
/// @example scss
|
|
222
|
-
/// .selector {
|
|
223
|
-
/// @include bpk-button();
|
|
224
|
-
/// @include bpk-button--secondary();
|
|
225
|
-
/// }
|
|
226
|
-
|
|
227
|
-
@mixin bpk-button--secondary {
|
|
228
|
-
@include utils.bpk-themeable-property(
|
|
229
|
-
color,
|
|
230
|
-
--bpk-button-secondary-text-color,
|
|
231
|
-
tokens.$bpk-text-primary-day
|
|
232
|
-
);
|
|
233
|
-
@include utils.bpk-themeable-property(
|
|
234
|
-
background-color,
|
|
235
|
-
--bpk-button-secondary-background-color,
|
|
236
|
-
tokens.$bpk-private-button-secondary-normal-background-day
|
|
237
|
-
);
|
|
238
|
-
|
|
239
|
-
@include utils.bpk-hover {
|
|
240
|
-
@include utils.bpk-themeable-property(
|
|
241
|
-
color,
|
|
242
|
-
--bpk-button-secondary-hover-text-color,
|
|
243
|
-
tokens.$bpk-text-primary-day
|
|
244
|
-
);
|
|
245
|
-
@include utils.bpk-themeable-property(
|
|
246
|
-
background-color,
|
|
247
|
-
--bpk-button-secondary-hover-background-color,
|
|
248
|
-
tokens.$bpk-private-button-secondary-pressed-background-day
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
&:active {
|
|
253
|
-
@include utils.bpk-themeable-property(
|
|
254
|
-
color,
|
|
255
|
-
--bpk-button-secondary-active-text-color,
|
|
256
|
-
tokens.$bpk-text-primary-day
|
|
257
|
-
);
|
|
258
|
-
@include utils.bpk-themeable-property(
|
|
259
|
-
background-color,
|
|
260
|
-
--bpk-button-secondary-active-background-color,
|
|
261
|
-
tokens.$bpk-private-button-secondary-pressed-background-day
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&:disabled {
|
|
266
|
-
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
267
|
-
color: tokens.$bpk-text-disabled-day;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/// Secondary on dark button. Modifies the bpk-button mixin.
|
|
272
|
-
///
|
|
273
|
-
/// @require {mixin} bpk-button
|
|
274
|
-
///
|
|
275
|
-
/// @example scss
|
|
276
|
-
/// .selector {
|
|
277
|
-
/// @include bpk-button();
|
|
278
|
-
/// @include bpk-button--secondary-on-dark();
|
|
279
|
-
/// }
|
|
280
|
-
|
|
281
|
-
@mixin bpk-button--secondary-on-dark {
|
|
282
|
-
@include utils.bpk-themeable-property(
|
|
283
|
-
color,
|
|
284
|
-
--bpk-button-secondary-on-dark-text-color,
|
|
285
|
-
tokens.$bpk-text-on-dark-day
|
|
286
|
-
);
|
|
287
|
-
@include utils.bpk-themeable-property(
|
|
288
|
-
background-color,
|
|
289
|
-
--bpk-button-secondary-on-dark-background-color,
|
|
290
|
-
tokens.$bpk-private-button-secondary-on-dark-normal-background-day
|
|
291
|
-
);
|
|
292
|
-
|
|
293
|
-
@include utils.bpk-hover {
|
|
294
|
-
@include utils.bpk-themeable-property(
|
|
295
|
-
color,
|
|
296
|
-
--bpk-button-secondary-on-dark-hover-text-color,
|
|
297
|
-
tokens.$bpk-text-on-dark-day
|
|
298
|
-
);
|
|
299
|
-
@include utils.bpk-themeable-property(
|
|
300
|
-
background-color,
|
|
301
|
-
--bpk-button-secondary-on-dark-hover-background-color,
|
|
302
|
-
tokens.$bpk-private-button-secondary-on-dark-pressed-background-day
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
&:active {
|
|
307
|
-
@include utils.bpk-themeable-property(
|
|
308
|
-
color,
|
|
309
|
-
--bpk-button-secondary-on-dark-active-text-color,
|
|
310
|
-
tokens.$bpk-text-on-dark-day
|
|
311
|
-
);
|
|
312
|
-
@include utils.bpk-themeable-property(
|
|
313
|
-
background-color,
|
|
314
|
-
--bpk-button-secondary-on-dark-active-background-color,
|
|
315
|
-
tokens.$bpk-private-button-secondary-on-dark-pressed-background-day
|
|
316
|
-
);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
&:disabled {
|
|
320
|
-
background-color: tokens.$bpk-private-button-secondary-on-dark-disabled-background-day;
|
|
321
|
-
color: tokens.$bpk-private-button-secondary-on-dark-disabled-foreground-day;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/// Destructive button. Modifies the bpk-button & bpk-button--secondary lib.
|
|
326
|
-
///
|
|
327
|
-
/// @require {mixin} bpk-button
|
|
328
|
-
/// @require {mixin} bpk-button--secondary
|
|
329
|
-
///
|
|
330
|
-
/// @example scss
|
|
331
|
-
/// .selector {
|
|
332
|
-
/// @include bpk-button();
|
|
333
|
-
/// @include bpk-button--secondary();
|
|
334
|
-
/// @include bpk-button--destructive();
|
|
335
|
-
/// }
|
|
336
|
-
|
|
337
|
-
@mixin bpk-button--destructive {
|
|
338
|
-
@include utils.bpk-themeable-property(
|
|
339
|
-
color,
|
|
340
|
-
--bpk-button-destructive-text-color,
|
|
341
|
-
tokens.$bpk-private-button-destructive-normal-foreground-day
|
|
342
|
-
);
|
|
343
|
-
@include utils.bpk-themeable-property(
|
|
344
|
-
background-color,
|
|
345
|
-
--bpk-button-destructive-background-color,
|
|
346
|
-
tokens.$bpk-private-button-destructive-normal-background-day
|
|
347
|
-
);
|
|
348
|
-
|
|
349
|
-
@include utils.bpk-hover {
|
|
350
|
-
@include utils.bpk-themeable-property(
|
|
351
|
-
color,
|
|
352
|
-
--bpk-button-destructive-hover-text-color,
|
|
353
|
-
tokens.$bpk-text-primary-inverse-day
|
|
354
|
-
);
|
|
355
|
-
@include utils.bpk-themeable-property(
|
|
356
|
-
background-color,
|
|
357
|
-
--bpk-button-destructive-hover-background-color,
|
|
358
|
-
tokens.$bpk-private-button-destructive-pressed-background-day
|
|
359
|
-
);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
&:active {
|
|
363
|
-
@include utils.bpk-themeable-property(
|
|
364
|
-
color,
|
|
365
|
-
--bpk-button-destructive-active-text-color,
|
|
366
|
-
tokens.$bpk-text-primary-inverse-day
|
|
367
|
-
);
|
|
368
|
-
@include utils.bpk-themeable-property(
|
|
369
|
-
background-color,
|
|
370
|
-
--bpk-button-destructive-active-background-color,
|
|
371
|
-
tokens.$bpk-private-button-destructive-pressed-background-day
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
&:disabled {
|
|
376
|
-
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
377
|
-
color: tokens.$bpk-text-disabled-day;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/// Link-style button. Modifies the bpk-button mixin.
|
|
382
|
-
///
|
|
383
|
-
/// @require {mixin} bpk-button
|
|
384
|
-
///
|
|
385
|
-
/// @example scss
|
|
386
|
-
/// .selector {
|
|
387
|
-
/// @include bpk-button();
|
|
388
|
-
/// @include bpk-button--link();
|
|
389
|
-
/// }
|
|
390
|
-
|
|
391
|
-
@mixin bpk-button--link {
|
|
392
|
-
$vertical-padding: tokens.$bpk-one-pixel-rem * 6;
|
|
393
|
-
$vertical-padding-large: tokens.$bpk-one-pixel-rem * 12;
|
|
394
|
-
|
|
395
|
-
background: none; /* stylelint-disable-line order/order, order/properties-order */
|
|
396
|
-
box-shadow: none;
|
|
397
|
-
|
|
398
|
-
@include typography.bpk-link--implicit;
|
|
399
|
-
|
|
400
|
-
&::after {
|
|
401
|
-
bottom: auto;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
padding: $vertical-padding 0; /* stylelint-disable-line order/order, order/properties-order */
|
|
405
|
-
color: tokens.$bpk-private-button-link-normal-foreground-day;
|
|
406
|
-
|
|
407
|
-
@include utils.bpk-hover {
|
|
408
|
-
background: none;
|
|
409
|
-
color: tokens.$bpk-private-button-link-pressed-foreground-day;
|
|
410
|
-
text-decoration: none;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
&:active {
|
|
414
|
-
background: none;
|
|
415
|
-
color: tokens.$bpk-private-button-link-pressed-foreground-day;
|
|
416
|
-
text-decoration: none;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
&:disabled {
|
|
420
|
-
background: none;
|
|
421
|
-
color: tokens.$bpk-text-disabled-day;
|
|
422
|
-
text-decoration: none;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
&-large {
|
|
426
|
-
padding: $vertical-padding-large 0;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/// Link on dark button. Modifies the bpk-button & bpk-button--link lib.
|
|
431
|
-
///
|
|
432
|
-
/// @require {mixin} bpk-button
|
|
433
|
-
|
|
434
|
-
/// @example scss
|
|
435
|
-
/// .selector {
|
|
436
|
-
/// @include bpk-button();
|
|
437
|
-
/// @include bpk-button--link-on-dark();
|
|
438
|
-
/// }
|
|
439
|
-
|
|
440
|
-
@mixin bpk-button--link-on-dark {
|
|
441
|
-
@include bpk-button--link;
|
|
442
|
-
@include utils.bpk-themeable-property(
|
|
443
|
-
color,
|
|
444
|
-
--bpk-button-link-on-dark-text-color,
|
|
445
|
-
tokens.$bpk-private-button-link-on-dark-normal-foreground-day
|
|
446
|
-
);
|
|
447
|
-
|
|
448
|
-
@include utils.bpk-hover {
|
|
449
|
-
@include utils.bpk-themeable-property(
|
|
450
|
-
color,
|
|
451
|
-
--bpk-button-link-on-dark-hover-text-color,
|
|
452
|
-
tokens.$bpk-private-button-link-on-dark-pressed-foreground-day
|
|
453
|
-
);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
&:active {
|
|
457
|
-
@include utils.bpk-themeable-property(
|
|
458
|
-
color,
|
|
459
|
-
--bpk-button-link-on-dark-active-text-color,
|
|
460
|
-
tokens.$bpk-private-button-link-on-dark-pressed-foreground-day
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
&:visited {
|
|
465
|
-
@include utils.bpk-themeable-property(
|
|
466
|
-
color,
|
|
467
|
-
--bpk-button-link-on-dark-text-color,
|
|
468
|
-
tokens.$bpk-private-button-link-on-dark-normal-foreground-day
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
&:disabled {
|
|
473
|
-
@include utils.bpk-themeable-property(
|
|
474
|
-
color,
|
|
475
|
-
--bpk-button-link-on-dark-disabled-color,
|
|
476
|
-
tokens.$bpk-private-button-link-on-dark-disabled-foreground-day
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/// Icon-only button. Modifies the bpk-button mixin.
|
|
482
|
-
///
|
|
483
|
-
/// @require {mixin} bpk-button
|
|
484
|
-
///
|
|
485
|
-
/// @example scss
|
|
486
|
-
/// .selector {
|
|
487
|
-
/// @include bpk-button();
|
|
488
|
-
/// @include bpk-button--icon-only();
|
|
489
|
-
/// }
|
|
490
|
-
|
|
491
|
-
@mixin bpk-button--icon-only {
|
|
492
|
-
$horizontal-padding: (tokens.$bpk-button-height - tokens.$bpk-icon-size-sm) * 0.5; // extra padding so that the width will be the same size as the size using sm icons
|
|
493
|
-
|
|
494
|
-
padding-right: $horizontal-padding;
|
|
495
|
-
padding-left: $horizontal-padding;
|
|
496
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/// Large icon-only button. Modifies the bpk-button & bpk-button--large lib.
|
|
500
|
-
///
|
|
501
|
-
/// @require {mixin} bpk-button
|
|
502
|
-
/// @require {mixin} bpk-button--large
|
|
503
|
-
///
|
|
504
|
-
/// @example scss
|
|
505
|
-
/// .selector {
|
|
506
|
-
/// @include bpk-button();
|
|
507
|
-
/// @include bpk-button--large();
|
|
508
|
-
/// @include bpk-button--large-icon-only();
|
|
509
|
-
/// }
|
|
510
|
-
|
|
511
|
-
@mixin bpk-button--large-icon-only {
|
|
512
|
-
$horizontal-padding: (tokens.$bpk-button-large-height - tokens.$bpk-icon-size-lg) * 0.5; // extra padding so that the width will be the same size as the size using lg icons
|
|
513
|
-
|
|
514
|
-
padding-right: $horizontal-padding;
|
|
515
|
-
padding-left: $horizontal-padding;
|
|
516
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/// Featured button. Modifies the bpk-button
|
|
520
|
-
///
|
|
521
|
-
/// @require {mixin} bpk-button
|
|
522
|
-
/// @require {mixin} bpk-button--large
|
|
523
|
-
///
|
|
524
|
-
/// @example scss
|
|
525
|
-
/// .selector {
|
|
526
|
-
/// @include bpk-button();
|
|
527
|
-
/// @include bpk-button--featured();
|
|
528
|
-
/// }
|
|
529
|
-
|
|
530
|
-
@mixin bpk-button--featured {
|
|
531
|
-
@include utils.bpk-themeable-property(
|
|
532
|
-
color,
|
|
533
|
-
--bpk-button-featured-text-color,
|
|
534
|
-
tokens.$bpk-text-primary-inverse-day
|
|
535
|
-
);
|
|
536
|
-
@include utils.bpk-themeable-property(
|
|
537
|
-
background-color,
|
|
538
|
-
--bpk-button-featured-background-color,
|
|
539
|
-
tokens.$bpk-private-button-featured-normal-background-day
|
|
540
|
-
);
|
|
541
|
-
|
|
542
|
-
@include utils.bpk-hover {
|
|
543
|
-
@include utils.bpk-themeable-property(
|
|
544
|
-
color,
|
|
545
|
-
--bpk-button-featured-hover-text-color,
|
|
546
|
-
tokens.$bpk-text-primary-inverse-day
|
|
547
|
-
);
|
|
548
|
-
@include utils.bpk-themeable-property(
|
|
549
|
-
background-color,
|
|
550
|
-
--bpk-button-featured-hover-background-color,
|
|
551
|
-
tokens.$bpk-private-button-featured-pressed-background-day
|
|
552
|
-
);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
&:active {
|
|
556
|
-
@include utils.bpk-themeable-property(
|
|
557
|
-
color,
|
|
558
|
-
--bpk-button-featured-active-text-color,
|
|
559
|
-
tokens.$bpk-text-primary-inverse-day
|
|
560
|
-
);
|
|
561
|
-
@include utils.bpk-themeable-property(
|
|
562
|
-
background-color,
|
|
563
|
-
--bpk-button-featured-active-background-color,
|
|
564
|
-
tokens.$bpk-private-button-featured-pressed-background-day
|
|
565
|
-
);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
&:disabled {
|
|
569
|
-
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
570
|
-
color: tokens.$bpk-text-disabled-day;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/// Full width button. Modifies the bpk-button to horizontally fill its container
|
|
575
|
-
///
|
|
576
|
-
/// @require {mixin} bpk-button
|
|
577
|
-
///
|
|
578
|
-
/// @example scss
|
|
579
|
-
/// .selector {
|
|
580
|
-
/// @include bpk-button();
|
|
581
|
-
/// @include bpk-button--full-width();
|
|
582
|
-
/// }
|
|
583
|
-
|
|
584
|
-
@mixin bpk-button--full-width {
|
|
585
|
-
display: block;
|
|
586
|
-
width: 100%;
|
|
587
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Backpack - Skyscanner's Design System
|
|
3
|
-
*
|
|
4
|
-
* Copyright 2016 Skyscanner Ltd
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/* stylelint-disable at-rule-disallowed-list */
|
|
20
|
-
|
|
21
|
-
@use 'tokens.scss';
|
|
22
|
-
@use 'radii.scss';
|
|
23
|
-
@use 'shadows.scss';
|
|
24
|
-
@use 'utils.scss';
|
|
25
|
-
|
|
26
|
-
////
|
|
27
|
-
/// @group cards
|
|
28
|
-
////
|
|
29
|
-
|
|
30
|
-
/// Basic card.
|
|
31
|
-
///
|
|
32
|
-
/// @example scss
|
|
33
|
-
/// .selector {
|
|
34
|
-
/// @include bpk-card();
|
|
35
|
-
/// }
|
|
36
|
-
|
|
37
|
-
@mixin bpk-card {
|
|
38
|
-
position: relative;
|
|
39
|
-
display: block;
|
|
40
|
-
background-color: tokens.$bpk-card-background-color;
|
|
41
|
-
color: tokens.$bpk-text-primary-day;
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
|
|
45
|
-
@include shadows.bpk-box-shadow-sm;
|
|
46
|
-
@include radii.bpk-border-radius-md;
|
|
47
|
-
|
|
48
|
-
@include utils.bpk-hover {
|
|
49
|
-
&::after {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Keep transitions and animations to only transform and opacity.
|
|
55
|
-
// This pseudo element solution allows us to animate box-shadow in a performant manner.
|
|
56
|
-
// http://tobiasahlin.com/blog/how-to-animate-box-shadow/
|
|
57
|
-
&::after {
|
|
58
|
-
position: absolute;
|
|
59
|
-
top: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
content: '';
|
|
64
|
-
transition: opacity tokens.$bpk-duration-sm ease-in-out;
|
|
65
|
-
opacity: 0;
|
|
66
|
-
pointer-events: none; // To prevent the pseudo element absorbing click events
|
|
67
|
-
|
|
68
|
-
@include shadows.bpk-box-shadow-lg;
|
|
69
|
-
@include radii.bpk-border-radius-md;
|
|
70
|
-
|
|
71
|
-
// pointer-events doesn't work on ie
|
|
72
|
-
@media screen\0 {
|
|
73
|
-
z-index: -1;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&:active::after {
|
|
78
|
-
box-shadow: none;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/// Adds padding to cards. Modifies the bpk-card mixin.
|
|
83
|
-
///
|
|
84
|
-
/// @require {mixin} bpk-card
|
|
85
|
-
///
|
|
86
|
-
/// @example scss
|
|
87
|
-
/// .selector {
|
|
88
|
-
/// @include bpk-card();
|
|
89
|
-
/// @include bpk-card--padded();
|
|
90
|
-
/// }
|
|
91
|
-
|
|
92
|
-
@mixin bpk-card--padded {
|
|
93
|
-
padding: tokens.$bpk-card-padding;
|
|
94
|
-
}
|