@skyscanner/backpack-web 38.22.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.
Files changed (44) hide show
  1. package/bpk-mixins/_badges-v2.scss +37 -36
  2. package/bpk-mixins/_badges.scss +37 -36
  3. package/bpk-mixins/_borders.scss +16 -16
  4. package/bpk-mixins/_breakpoints.scss +11 -11
  5. package/bpk-mixins/_buttons.scss +141 -137
  6. package/bpk-mixins/_cards.scss +13 -13
  7. package/bpk-mixins/_chips.scss +66 -66
  8. package/bpk-mixins/_forms.scss +214 -202
  9. package/bpk-mixins/_icons.scss +7 -4
  10. package/bpk-mixins/_index.scss +19 -19
  11. package/bpk-mixins/_layers.scss +34 -34
  12. package/bpk-mixins/_margins.scss +3 -3
  13. package/bpk-mixins/_panels.scss +9 -9
  14. package/bpk-mixins/_radii.scss +6 -6
  15. package/bpk-mixins/_scroll-indicators.scss +2 -2
  16. package/bpk-mixins/_shadows.scss +4 -4
  17. package/bpk-mixins/_spinners.scss +10 -10
  18. package/bpk-mixins/_tokens.scss +1 -3
  19. package/bpk-mixins/_typography.scss +204 -195
  20. package/bpk-mixins/_utils.scss +17 -12
  21. package/bpk-stylesheets/index.scss +13 -14
  22. package/bpk-stylesheets/normalize.css +18 -422
  23. package/bpk-stylesheets/normalize.scss +422 -0
  24. package/package.json +1 -5
  25. package/unstable__bpk-mixins/_badges-v2.scss +0 -240
  26. package/unstable__bpk-mixins/_badges.scss +0 -240
  27. package/unstable__bpk-mixins/_borders.scss +0 -268
  28. package/unstable__bpk-mixins/_breakpoints.scss +0 -221
  29. package/unstable__bpk-mixins/_buttons.scss +0 -587
  30. package/unstable__bpk-mixins/_cards.scss +0 -94
  31. package/unstable__bpk-mixins/_chips.scss +0 -249
  32. package/unstable__bpk-mixins/_forms.scss +0 -1045
  33. package/unstable__bpk-mixins/_icons.scss +0 -88
  34. package/unstable__bpk-mixins/_index.scss +0 -38
  35. package/unstable__bpk-mixins/_layers.scss +0 -199
  36. package/unstable__bpk-mixins/_margins.scss +0 -75
  37. package/unstable__bpk-mixins/_panels.scss +0 -96
  38. package/unstable__bpk-mixins/_radii.scss +0 -80
  39. package/unstable__bpk-mixins/_scroll-indicators.scss +0 -79
  40. package/unstable__bpk-mixins/_shadows.scss +0 -58
  41. package/unstable__bpk-mixins/_spinners.scss +0 -102
  42. package/unstable__bpk-mixins/_tokens.scss +0 -19
  43. package/unstable__bpk-mixins/_typography.scss +0 -1225
  44. package/unstable__bpk-mixins/_utils.scss +0 -267
@@ -1,1225 +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 'borders.scss';
23
- @use 'radii.scss';
24
- @use 'utils.scss';
25
-
26
- ////
27
- /// @group typography
28
- ////
29
-
30
- /// Type factory.
31
- ///
32
- /// @param {variable} $font-size
33
- /// @param {variable} $line-height
34
- /// @param {variable} $font-weight false
35
- /// @param {variable} $letter-spacing false
36
- ///
37
- /// @access private
38
-
39
- @mixin _bpk-text-factory(
40
- $font-size,
41
- $line-height,
42
- $font-weight: false,
43
- $letter-spacing: false
44
- ) {
45
- font-size: $font-size;
46
- line-height: $line-height;
47
-
48
- @if $font-weight {
49
- font-weight: $font-weight;
50
- }
51
-
52
- @if $letter-spacing {
53
- letter-spacing: $letter-spacing;
54
- }
55
- }
56
-
57
- /// Text margin reset.
58
- ///
59
- /// @example scss
60
- /// .selector {
61
- /// @include bpk-text;
62
- /// }
63
-
64
- @mixin bpk-text {
65
- margin: 0;
66
- }
67
-
68
- /// Extra small text style
69
- ///
70
- /// @require {mixin} bpk-text
71
- ///
72
- /// @example scss
73
- /// .selector {
74
- /// @include bpk-text;
75
- /// @include bpk-text--xs;
76
- /// }
77
-
78
- @mixin bpk-text--xs {
79
- @include _bpk-text-factory(
80
- tokens.$bpk-font-size-xs,
81
- tokens.$bpk-line-height-xs,
82
- tokens.$bpk-font-weight-book
83
- );
84
- }
85
-
86
- /// Extra small text style (without margin reset)
87
- ///
88
- /// @example scss
89
- /// .selector {
90
- /// @include bpk-text-xs;
91
- /// }
92
-
93
- @mixin bpk-text-xs {
94
- @include bpk-text--xs;
95
- }
96
-
97
- /// Small text style
98
- ///
99
- /// @require {mixin} bpk-text
100
- ///
101
- /// @example scss
102
- /// .selector {
103
- /// @include bpk-text;
104
- /// @include bpk-text--sm;
105
- /// }
106
-
107
- @mixin bpk-text--sm {
108
- @include _bpk-text-factory(
109
- tokens.$bpk-font-size-sm,
110
- tokens.$bpk-line-height-sm,
111
- tokens.$bpk-font-weight-book
112
- );
113
- }
114
-
115
- /// Small text style (without margin reset)
116
- ///
117
- /// @example scss
118
- /// .selector {
119
- /// @include bpk-text-sm;
120
- /// }
121
-
122
- @mixin bpk-text-sm {
123
- @include bpk-text--sm;
124
- }
125
-
126
- /// Base text style
127
- ///
128
- /// @require {mixin} bpk-text
129
- ///
130
- /// @example scss
131
- /// .selector {
132
- /// @include bpk-text;
133
- /// @include bpk-text--base;
134
- /// }
135
-
136
- @mixin bpk-text--base {
137
- @include _bpk-text-factory(
138
- tokens.$bpk-font-size-base,
139
- tokens.$bpk-line-height-base,
140
- tokens.$bpk-font-weight-book
141
- );
142
- }
143
-
144
- /// Base text style (without margin reset)
145
- ///
146
- /// @example scss
147
- /// .selector {
148
- /// @include bpk-text-base;
149
- /// }
150
-
151
- @mixin bpk-text-base {
152
- @include bpk-text--base;
153
- }
154
-
155
- /// Large text style
156
- ///
157
- /// @require {mixin} bpk-text
158
- ///
159
- /// @example scss
160
- /// .selector {
161
- /// @include bpk-text;
162
- /// @include bpk-text--lg;
163
- /// }
164
-
165
- @mixin bpk-text--lg {
166
- @include _bpk-text-factory(
167
- tokens.$bpk-font-size-lg,
168
- tokens.$bpk-line-height-lg,
169
- tokens.$bpk-font-weight-book
170
- );
171
- }
172
-
173
- /// Large text style (without margin reset)
174
- ///
175
- /// @example scss
176
- /// .selector {
177
- /// @include bpk-text-lg;
178
- /// }
179
-
180
- @mixin bpk-text-lg {
181
- @include bpk-text--lg;
182
- }
183
-
184
- /// Extra large text style
185
- ///
186
- /// @require {mixin} bpk-text
187
- ///
188
- /// @example scss
189
- /// .selector {
190
- /// @include bpk-text;
191
- /// @include bpk-text--xl;
192
- /// }
193
-
194
- @mixin bpk-text--xl {
195
- @include _bpk-text-factory(
196
- tokens.$bpk-font-size-xl,
197
- tokens.$bpk-line-height-xl,
198
- tokens.$bpk-font-weight-book
199
- );
200
- }
201
-
202
- /// Extra large text style (without margin reset)
203
- ///
204
- /// @example scss
205
- /// .selector {
206
- /// @include bpk-text-xl;
207
- /// }
208
-
209
- @mixin bpk-text-xl {
210
- @include bpk-text--xl;
211
- }
212
-
213
- /// Extra extra large text style
214
- ///
215
- /// @require {mixin} bpk-text
216
- ///
217
- /// @example scss
218
- /// .selector {
219
- /// @include bpk-text;
220
- /// @include bpk-text--xxl;
221
- /// }
222
-
223
- @mixin bpk-text--xxl {
224
- @include _bpk-text-factory(
225
- tokens.$bpk-font-size-xxl,
226
- tokens.$bpk-line-height-xxl,
227
- tokens.$bpk-font-weight-bold
228
- );
229
- }
230
-
231
- /// Extra extra large text style (without margin reset)
232
- ///
233
- /// @example scss
234
- /// .selector {
235
- /// @include bpk-text-xxl;
236
- /// }
237
-
238
- @mixin bpk-text-xxl {
239
- @include bpk-text--xxl;
240
- }
241
-
242
- /// Extra extra large text style
243
- ///
244
- /// @require {mixin} bpk-text
245
- ///
246
- /// @example scss
247
- /// .selector {
248
- /// @include bpk-text;
249
- /// @include bpk-text--xxxl;
250
- /// }
251
-
252
- @mixin bpk-text--xxxl {
253
- @include _bpk-text-factory(
254
- tokens.$bpk-font-size-xxxl,
255
- tokens.$bpk-line-height-xxxl,
256
- tokens.$bpk-font-weight-bold
257
- );
258
- }
259
-
260
- /// Extra extra large text style (without margin reset)
261
- ///
262
- /// @example scss
263
- /// .selector {
264
- /// @include bpk-text-xxxl;
265
- /// }
266
-
267
- @mixin bpk-text-xxxl {
268
- @include bpk-text--xxxl;
269
- }
270
-
271
- /// Extra extra large text style
272
- ///
273
- /// @require {mixin} bpk-text
274
- ///
275
- /// @example scss
276
- /// .selector {
277
- /// @include bpk-text;
278
- /// @include bpk-text--xxxxl;
279
- /// }
280
-
281
- @mixin bpk-text--xxxxl {
282
- @include _bpk-text-factory(
283
- tokens.$bpk-font-size-xxxxl,
284
- tokens.$bpk-line-height-xxxxl,
285
- tokens.$bpk-font-weight-bold,
286
- tokens.$bpk-letter-spacing-tight
287
- );
288
- }
289
-
290
- /// Extra extra large text style (without margin reset)
291
- ///
292
- /// @example scss
293
- /// .selector {
294
- /// @include bpk-text-xxxxl;
295
- /// }
296
-
297
- @mixin bpk-text-xxxxl {
298
- @include bpk-text--xxxxl;
299
- }
300
-
301
- /// Extra extra large text style
302
- ///
303
- /// @require {mixin} bpk-text
304
- ///
305
- /// @example scss
306
- /// .selector {
307
- /// @include bpk-text;
308
- /// @include bpk-text--xxxxxl;
309
- /// }
310
-
311
- @mixin bpk-text--xxxxxl {
312
- @include _bpk-text-factory(
313
- tokens.$bpk-font-size-xxxxxl,
314
- tokens.$bpk-line-height-xxxxxl,
315
- tokens.$bpk-font-weight-bold,
316
- tokens.$bpk-letter-spacing-tight
317
- );
318
- }
319
-
320
- /// Extra extra large text style (without margin reset)
321
- ///
322
- /// @example scss
323
- /// .selector {
324
- /// @include bpk-text-xxxxxl;
325
- /// }
326
-
327
- @mixin bpk-text-xxxxxl {
328
- @include bpk-text--xxxxxl;
329
- }
330
-
331
- /// Bold text style
332
- ///
333
- /// @require {mixin} bpk-text
334
- ///
335
- /// @example scss
336
- /// .selector {
337
- /// @include bpk-text;
338
- /// @include bpk-text--bold;
339
- /// }
340
-
341
- @mixin bpk-text--bold {
342
- font-weight: tokens.$bpk-font-weight-bold;
343
- }
344
-
345
- /// Bold text style (without margin reset)
346
- ///
347
- /// @example scss
348
- /// .selector {
349
- /// @include bpk-text-bold;
350
- /// }
351
-
352
- @mixin bpk-text-bold {
353
- @include bpk-text--bold;
354
- }
355
-
356
- /// Black text style
357
- ///
358
- /// @require {mixin} bpk-text
359
- ///
360
- /// @example scss
361
- /// .selector {
362
- /// @include bpk-text;
363
- /// @include bpk-text--black;
364
- /// }
365
-
366
- @mixin bpk-text--black {
367
- font-weight: tokens.$bpk-font-weight-black;
368
- }
369
-
370
- /// Black text style (without margin reset)
371
- ///
372
- /// @example scss
373
- /// .selector {
374
- /// @include bpk-text-heavy;
375
- /// }
376
-
377
- @mixin bpk-text-black {
378
- @include bpk-text--black;
379
- }
380
-
381
- /// Caption text style
382
- ///
383
- /// @example scss
384
- /// .selector {
385
- /// @include bpk-caption;
386
- /// }
387
-
388
- @mixin bpk-caption {
389
- @include _bpk-text-factory(
390
- tokens.$bpk-font-size-xs,
391
- tokens.$bpk-line-height-xs,
392
- tokens.$bpk-font-weight-book
393
- );
394
- }
395
-
396
- /// Footnote text style
397
- ///
398
- /// @example scss
399
- /// .selector {
400
- /// @include bpk-footnote;
401
- /// }
402
-
403
- @mixin bpk-footnote {
404
- @include _bpk-text-factory(
405
- tokens.$bpk-font-size-sm,
406
- tokens.$bpk-line-height-sm,
407
- tokens.$bpk-font-weight-book
408
- );
409
- }
410
-
411
- /// Label-1 text style
412
- ///
413
- /// @example scss
414
- /// .selector {
415
- /// @include bpk-label-1;
416
- /// }
417
-
418
- @mixin bpk-label-1 {
419
- @include _bpk-text-factory(
420
- tokens.$bpk-font-size-base,
421
- tokens.$bpk-line-height-base,
422
- tokens.$bpk-font-weight-bold
423
- );
424
- }
425
-
426
- /// Label-2 text style
427
- ///
428
- /// @example scss
429
- /// .selector {
430
- /// @include bpk-label-2;
431
- /// }
432
-
433
- @mixin bpk-label-2 {
434
- @include _bpk-text-factory(
435
- tokens.$bpk-font-size-sm,
436
- tokens.$bpk-line-height-sm,
437
- tokens.$bpk-font-weight-bold
438
- );
439
- }
440
-
441
- /// Label-3 text style
442
- ///
443
- /// @example scss
444
- /// .selector {
445
- /// @include bpk-label-3;
446
- /// }
447
-
448
- @mixin bpk-label-3 {
449
- @include _bpk-text-factory(
450
- tokens.$bpk-font-size-xs,
451
- tokens.$bpk-line-height-xs,
452
- tokens.$bpk-font-weight-bold
453
- );
454
- }
455
-
456
- /// Default body text style
457
- ///
458
- /// @example scss
459
- /// .selector {
460
- /// @include bpk-body-default;
461
- /// }
462
-
463
- @mixin bpk-body-default {
464
- @include _bpk-text-factory(
465
- tokens.$bpk-font-size-base,
466
- tokens.$bpk-line-height-base,
467
- tokens.$bpk-font-weight-book
468
- );
469
- }
470
-
471
- /// Longform body text style
472
- ///
473
- /// @example scss
474
- /// .selector {
475
- /// @include bpk-body-longform;
476
- /// }
477
-
478
- @mixin bpk-body-longform {
479
- @include _bpk-text-factory(
480
- tokens.$bpk-font-size-lg,
481
- tokens.$bpk-line-height-lg,
482
- tokens.$bpk-font-weight-book
483
- );
484
- }
485
-
486
- /// Subheading text style
487
- ///
488
- /// @example scss
489
- /// .selector {
490
- /// @include bpk-subheading;
491
- /// }
492
-
493
- @mixin bpk-subheading {
494
- @include _bpk-text-factory(
495
- tokens.$bpk-font-size-xl,
496
- tokens.$bpk-line-height-xl,
497
- tokens.$bpk-font-weight-book
498
- );
499
- }
500
-
501
- /// Editorial 1 text style
502
- ///
503
- /// @example scss
504
- /// .selector {
505
- /// @include bpk-editorial-1;
506
- /// }
507
-
508
- @mixin bpk-editorial-1 {
509
- font-family: tokens.$bpk-font-family-larken;
510
-
511
- @include _bpk-text-factory(
512
- tokens.$bpk-font-size-xxxxl,
513
- tokens.$bpk-line-height-xxxxl,
514
- tokens.$bpk-font-weight-light
515
- );
516
- }
517
-
518
- /// Editorial 2 text style
519
- ///
520
- /// @example scss
521
- /// .selector {
522
- /// @include bpk-editorial-2;
523
- /// }
524
-
525
- @mixin bpk-editorial-2 {
526
- font-family: tokens.$bpk-font-family-larken;
527
-
528
- @include _bpk-text-factory(
529
- tokens.$bpk-font-size-xxl,
530
- tokens.$bpk-line-height-xxl,
531
- tokens.$bpk-font-weight-light
532
- );
533
- }
534
-
535
- /// Editorial 3 text style
536
- ///
537
- /// @example scss
538
- /// .selector {
539
- /// @include bpk-editorial-3;
540
- /// }
541
-
542
- @mixin bpk-editorial-3 {
543
- font-family: tokens.$bpk-font-family-larken;
544
-
545
- @include _bpk-text-factory(
546
- tokens.$bpk-font-size-lg,
547
- tokens.$bpk-line-height-lg,
548
- tokens.$bpk-font-weight-book
549
- );
550
- }
551
-
552
- /// Hero 1 text style
553
- ///
554
- /// @example scss
555
- /// .selector {
556
- /// @include bpk-hero-1;
557
- /// }
558
-
559
- @mixin bpk-hero-1 {
560
- @include _bpk-text-factory(
561
- tokens.$bpk-font-size-8-xl,
562
- tokens.$bpk-line-height-8-xl,
563
- tokens.$bpk-font-weight-black,
564
- tokens.$bpk-letter-spacing-hero
565
- );
566
- }
567
-
568
- /// Hero 2 text style
569
- ///
570
- /// @example scss
571
- /// .selector {
572
- /// @include bpk-hero-2;
573
- /// }
574
-
575
- @mixin bpk-hero-2 {
576
- @include _bpk-text-factory(
577
- tokens.$bpk-font-size-7-xl,
578
- tokens.$bpk-line-height-7-xl,
579
- tokens.$bpk-font-weight-black,
580
- tokens.$bpk-letter-spacing-hero
581
- );
582
- }
583
-
584
- /// Hero 3 text style
585
- ///
586
- /// @example scss
587
- /// .selector {
588
- /// @include bpk-hero-3;
589
- /// }
590
-
591
- @mixin bpk-hero-3 {
592
- @include _bpk-text-factory(
593
- tokens.$bpk-font-size-6-xl,
594
- tokens.$bpk-line-height-6-xl,
595
- tokens.$bpk-font-weight-black,
596
- tokens.$bpk-letter-spacing-hero
597
- );
598
- }
599
-
600
- /// Hero 4 text style
601
- ///
602
- /// @example scss
603
- /// .selector {
604
- /// @include bpk-hero-4;
605
- /// }
606
-
607
- @mixin bpk-hero-4 {
608
- @include _bpk-text-factory(
609
- tokens.$bpk-font-size-xxxxxl,
610
- tokens.$bpk-line-height-xxxxxl,
611
- tokens.$bpk-font-weight-black,
612
- tokens.$bpk-letter-spacing-hero
613
- );
614
- }
615
-
616
- /// Hero 5 text style
617
- ///
618
- /// @example scss
619
- /// .selector {
620
- /// @include bpk-hero-5;
621
- /// }
622
-
623
- @mixin bpk-hero-5 {
624
- @include _bpk-text-factory(
625
- tokens.$bpk-font-size-xxxxl,
626
- tokens.$bpk-line-height-xxxl,
627
- tokens.$bpk-font-weight-black,
628
- tokens.$bpk-letter-spacing-hero
629
- );
630
- }
631
-
632
- /// Hero 6 text style
633
- ///
634
- /// @example scss
635
- /// .selector {
636
- /// @include bpk-hero-6;
637
- /// }
638
-
639
- @mixin bpk-hero-6 {
640
- @include _bpk-text-factory(
641
- tokens.$bpk-font-size-xxxl,
642
- tokens.$bpk-line-height-xxl,
643
- tokens.$bpk-font-weight-black,
644
- tokens.$bpk-letter-spacing-hero
645
- );
646
- }
647
-
648
- /// Level 1 heading.
649
- ///
650
- /// @example scss
651
- /// .selector {
652
- /// @include bpk-heading-1();
653
- /// }
654
-
655
- @mixin bpk-heading-1 {
656
- @include _bpk-text-factory(
657
- tokens.$bpk-font-size-xxxl,
658
- tokens.$bpk-line-height-xxxl,
659
- tokens.$bpk-font-weight-bold
660
- );
661
- }
662
-
663
- /// Level 2 heading.
664
- ///
665
- /// @example scss
666
- /// .selector {
667
- /// @include bpk-heading-2();
668
- /// }
669
-
670
- @mixin bpk-heading-2 {
671
- @include _bpk-text-factory(
672
- tokens.$bpk-font-size-xxl,
673
- tokens.$bpk-line-height-xxl,
674
- tokens.$bpk-font-weight-bold
675
- );
676
- }
677
-
678
- /// Level 3 heading.
679
- ///
680
- /// @example scss
681
- /// .selector {
682
- /// @include bpk-heading-3();
683
- /// }
684
-
685
- @mixin bpk-heading-3 {
686
- @include _bpk-text-factory(
687
- tokens.$bpk-font-size-xl,
688
- tokens.$bpk-line-height-xl-tight,
689
- tokens.$bpk-font-weight-bold
690
- );
691
- }
692
-
693
- /// Level 4 heading.
694
- ///
695
- /// @example scss
696
- /// .selector {
697
- /// @include bpk-heading-4();
698
- /// }
699
-
700
- @mixin bpk-heading-4 {
701
- @include _bpk-text-factory(
702
- tokens.$bpk-font-size-lg,
703
- tokens.$bpk-line-height-lg-tight,
704
- tokens.$bpk-font-weight-bold
705
- );
706
- }
707
-
708
- /// Level 5 heading.
709
- ///
710
- /// @example scss
711
- /// .selector {
712
- /// @include bpk-heading-5();
713
- /// }
714
-
715
- @mixin bpk-heading-5 {
716
- @include _bpk-text-factory(
717
- tokens.$bpk-font-size-base,
718
- tokens.$bpk-line-height-base-tight,
719
- tokens.$bpk-font-weight-bold
720
- );
721
- }
722
-
723
- /// Paragraph.
724
- ///
725
- /// @example scss
726
- /// .selector {
727
- /// @include bpk-paragraph();
728
- /// }
729
-
730
- @mixin bpk-paragraph {
731
- margin-top: tokens.$bpk-spacing-none;
732
- margin-bottom: tokens.bpk-spacing-base();
733
- }
734
-
735
- /// List.
736
- ///
737
- /// @example scss
738
- /// .selector {
739
- /// @include bpk-list();
740
- /// }
741
-
742
- @mixin bpk-list {
743
- margin-top: tokens.bpk-spacing-base();
744
- margin-bottom: tokens.bpk-spacing-base();
745
- padding-left: tokens.bpk-spacing-lg();
746
- }
747
-
748
- /// Nested list. Modifies the bpk-list mixin.
749
- ///
750
- /// @require {mixin} bpk-list
751
- ///
752
- /// @example scss
753
- /// .selector {
754
- /// @include bpk-list();
755
- /// @include bpk-list--nested();
756
- /// }
757
-
758
- @mixin bpk-list--nested {
759
- margin-top: tokens.$bpk-spacing-none;
760
- margin-bottom: tokens.$bpk-spacing-none;
761
- padding-top: tokens.bpk-spacing-md();
762
- padding-bottom: tokens.bpk-spacing-sm();
763
- }
764
-
765
- /// List item.
766
- ///
767
- /// @example scss
768
- /// .selector {
769
- /// @include bpk-list-item();
770
- /// }
771
-
772
- @mixin bpk-list-item {
773
- margin-top: 0;
774
- margin-bottom: tokens.bpk-spacing-sm();
775
- }
776
-
777
- /// Underlined part inside an inline link.
778
- ///
779
- /// @example scss
780
- /// .selector {
781
- /// @include bpk-link-underlined();
782
- /// }
783
-
784
- @mixin bpk-link-underlined {
785
- padding-bottom: tokens.$bpk-one-pixel-rem;
786
- transition: background-size 200ms ease;
787
- background: linear-gradient(tokens.$bpk-text-primary-day, tokens.$bpk-text-primary-day);
788
- background-repeat: no-repeat;
789
- background-position: 0 100%;
790
- background-size: 100% tokens.$bpk-border-size-sm;
791
-
792
- @include utils.bpk-hover {
793
- background-size: 0 tokens.$bpk-border-size-sm;
794
- }
795
- }
796
-
797
- /// Underlined part inside an implicit inline link.
798
- ///
799
- /// @example scss
800
- /// .selector {
801
- /// @include bpk-link-underlined--implicit();
802
- /// }
803
-
804
- @mixin bpk-link-underlined--implicit {
805
- background-size: 0 tokens.$bpk-border-size-sm;
806
-
807
- @include utils.bpk-hover {
808
- background-size: 100% tokens.$bpk-border-size-sm;
809
- }
810
- }
811
-
812
- /// Underlined part inside an alternate inline link.
813
- ///
814
- /// @example scss
815
- /// .selector {
816
- /// @include bpk-link-underlined--alternate();
817
- /// }
818
-
819
- @mixin bpk-link-underlined--alternate {
820
- background: linear-gradient(tokens.$bpk-text-on-dark-day, tokens.$bpk-text-on-dark-day);
821
- background-repeat: no-repeat;
822
- background-position: 0 100%;
823
- background-size: 100% tokens.$bpk-border-size-sm;
824
-
825
- @include utils.bpk-hover {
826
- background-size: 0 tokens.$bpk-border-size-sm;
827
- }
828
- }
829
-
830
- /// Underlined part inside an implicit alternate inline link.
831
- ///
832
- /// @example scss
833
- /// .selector {
834
- /// @include bpk-link-underlined-implicit--alternate();
835
- /// }
836
-
837
- @mixin bpk-link-underlined-implicit--alternate {
838
- background: linear-gradient(tokens.$bpk-text-on-dark-day, tokens.$bpk-text-on-dark-day);
839
- background-repeat: no-repeat;
840
- background-position: 0 100%;
841
- background-size: 0 tokens.$bpk-border-size-sm;
842
-
843
- @include utils.bpk-hover {
844
- background-size: 100% tokens.$bpk-border-size-sm;
845
- }
846
- }
847
-
848
- /// Inline link.
849
- ///
850
- /// @example scss
851
- /// .selector {
852
- /// @include bpk-link();
853
- /// }
854
-
855
- @mixin bpk-link {
856
- position: relative;
857
- display: inline;
858
- padding: 0;
859
- border: 0;
860
- background-color: transparent;
861
- text-decoration: none;
862
- cursor: pointer;
863
- appearance: none;
864
-
865
- @include utils.bpk-themeable-property(
866
- color,
867
- --bpk-link-color,
868
- tokens.$bpk-text-primary-day
869
- );
870
-
871
- @include utils.bpk-hover {
872
- text-decoration: none;
873
-
874
- @include utils.bpk-themeable-property(
875
- color,
876
- --bpk-link-hover-color,
877
- tokens.$bpk-text-primary-day
878
- );
879
- }
880
-
881
- &:visited {
882
- @include utils.bpk-themeable-property(
883
- color,
884
- --bpk-link-visited-color,
885
- tokens.$bpk-text-primary-day
886
- );
887
- }
888
-
889
- &:active {
890
- @include utils.bpk-themeable-property(
891
- color,
892
- --bpk-link-active-color,
893
- tokens.$bpk-text-primary-day
894
- );
895
- }
896
- }
897
-
898
- /// Implicit inline link.
899
- ///
900
- /// @example scss
901
- /// .selector {
902
- /// @include bpk-link();
903
- /// @include bpk-link--implicit();
904
- /// }
905
-
906
- @mixin bpk-link--implicit {
907
- @include utils.bpk-themeable-property(
908
- color,
909
- --bpk-link-color,
910
- tokens.$bpk-text-primary-day
911
- );
912
-
913
- @include utils.bpk-hover {
914
- @include utils.bpk-themeable-property(
915
- color,
916
- --bpk-link-hover-color,
917
- tokens.$bpk-text-primary-day
918
- );
919
- }
920
-
921
- &:active {
922
- text-decoration: none;
923
-
924
- @include utils.bpk-themeable-property(
925
- color,
926
- --bpk-link-active-color,
927
- tokens.$bpk-text-primary-day
928
- );
929
- }
930
- }
931
-
932
- /// White link. Modifies the bpk-link mixin.
933
- ///
934
- /// @require {mixin} bpk-link
935
- ///
936
- /// @example scss
937
- /// .selector {
938
- /// @include bpk-link();
939
- /// @include bpk-link--white();
940
- /// }
941
-
942
- @mixin bpk-link--alternate {
943
- @include utils.bpk-themeable-property(
944
- color,
945
- --bpk-link-alternate-color,
946
- tokens.$bpk-text-on-dark-day
947
- );
948
-
949
- @include utils.bpk-hover {
950
- @include utils.bpk-themeable-property(
951
- color,
952
- --bpk-link-alternate-hover-color,
953
- tokens.$bpk-text-on-dark-day
954
- );
955
- }
956
-
957
- &:visited {
958
- @include utils.bpk-themeable-property(
959
- color,
960
- --bpk-link-alternate-visited-color,
961
- tokens.$bpk-text-on-dark-day
962
- );
963
- }
964
-
965
- &:active {
966
- @include utils.bpk-themeable-property(
967
- color,
968
- --bpk-link-alternate-active-color,
969
- tokens.$bpk-text-on-dark-day
970
- );
971
- }
972
- }
973
-
974
- /// White link. Modifies the bpk-link mixin.
975
- ///
976
- /// @require {mixin} bpk-link
977
- ///
978
- /// @example scss
979
- /// .selector {
980
- /// @include bpk-link();
981
- /// @include bpk-link--white();
982
- /// }
983
-
984
- @mixin bpk-link--white {
985
- @include bpk-link--alternate;
986
- }
987
-
988
- /// Active link. Modifies the bpk-link mixin.
989
- ///
990
- /// @require {mixin} bpk-link
991
- ///
992
- /// @example scss
993
- /// .selector {
994
- /// @include bpk-link();
995
- /// @include bpk-link--active();
996
- /// }
997
-
998
- @mixin bpk-link--active {
999
- color: tokens.$bpk-text-primary-day;
1000
-
1001
- &:visited {
1002
- color: tokens.$bpk-text-primary-day;
1003
- }
1004
-
1005
- &:active {
1006
- color: tokens.$bpk-text-primary-day;
1007
- }
1008
- }
1009
-
1010
- /// Table.
1011
- ///
1012
- /// @example scss
1013
- /// .selector {
1014
- /// @include bpk-table();
1015
- /// }
1016
-
1017
- @mixin bpk-table {
1018
- width: 100%;
1019
- margin-bottom: tokens.bpk-spacing-md();
1020
- border-collapse: collapse;
1021
- table-layout: fixed;
1022
-
1023
- @include borders.bpk-border-sm(tokens.$bpk-line-day, '');
1024
- }
1025
-
1026
- /// Alternate table style.
1027
- /// @require {mixin} bpk-table
1028
- ///
1029
- /// @example scss
1030
- /// .selector {
1031
- /// @include bpk-table();
1032
- /// @include bpk-table--alternate();
1033
- /// }
1034
-
1035
- @mixin bpk-table--alternate {
1036
- @include borders.bpk-border-sm(tokens.$bpk-line-day, '');
1037
- }
1038
-
1039
- /// Table cell.
1040
- ///
1041
- /// @example scss
1042
- /// .selector {
1043
- /// @include bpk-table__cell();
1044
- /// }
1045
-
1046
- @mixin bpk-table__cell {
1047
- padding: tokens.bpk-spacing-base();
1048
- }
1049
-
1050
- /// Table head cell. Modifies the bpk-table__cell mixin.
1051
- ///
1052
- /// @require {mixin} bpk-table__cell
1053
- ///
1054
- /// @example scss
1055
- /// .selector {
1056
- /// @include bpk-table__cell();
1057
- /// @include bpk-table__cell--head();
1058
- /// }
1059
-
1060
- @mixin bpk-table__cell--head {
1061
- background-color: tokens.$bpk-canvas-contrast-day;
1062
- text-align: left;
1063
-
1064
- @include bpk-label-1;
1065
-
1066
- @include utils.bpk-rtl {
1067
- text-align: right;
1068
- }
1069
- }
1070
-
1071
- /// Alternate table head cell. Modifies the bpk-table__cell mixin.
1072
- ///
1073
- /// @require {mixin} bpk-table__cell
1074
- ///
1075
- /// @example scss
1076
- /// .selector {
1077
- /// @include bpk-table__cell();
1078
- /// @include bpk-table__cell--head-alternate();
1079
- /// }
1080
-
1081
- @mixin bpk-table__cell--head-alternate {
1082
- background-color: tokens.$bpk-canvas-day;
1083
- text-align: left;
1084
-
1085
- @include bpk-text--bold;
1086
-
1087
- @include utils.bpk-rtl {
1088
- text-align: right;
1089
- }
1090
- }
1091
-
1092
- /// Code.
1093
- ///
1094
- /// @example scss
1095
- /// .selector {
1096
- /// @include bpk-code();
1097
- /// }
1098
-
1099
- @mixin bpk-code {
1100
- display: inline;
1101
- padding: 0 tokens.bpk-spacing-sm();
1102
- background-color: tokens.$bpk-surface-highlight-day;
1103
- color: tokens.$bpk-text-primary-day;
1104
- text-align: left;
1105
- white-space: nowrap;
1106
- vertical-align: bottom;
1107
-
1108
- @include radii.bpk-border-radius-xs;
1109
-
1110
- @include utils.bpk-rtl {
1111
- direction: ltr;
1112
- }
1113
- }
1114
-
1115
- /// Alternate code style suited for display on non-white backgrounds.
1116
- ///
1117
- /// @example scss
1118
- /// .selector {
1119
- /// @include bpk-code();
1120
- /// @include bpk-code--alternate();
1121
- /// }
1122
-
1123
- @mixin bpk-code--alternate {
1124
- background-color: tokens.$bpk-canvas-contrast-day;
1125
- text-shadow: none;
1126
- }
1127
-
1128
- /// Code block. Modifies the bpk-code mixin.
1129
- ///
1130
- /// @require {mixin} bpk-code
1131
- ///
1132
- /// @example scss
1133
- /// .selector {
1134
- /// @include bpk-code();
1135
- /// @include bpk-code--block();
1136
- /// }
1137
-
1138
- @mixin bpk-code--block {
1139
- display: block;
1140
- margin: 0;
1141
- padding: 0;
1142
- background-color: transparent;
1143
- white-space: inherit;
1144
- overflow: auto;
1145
- -ms-overflow-style: none;
1146
-
1147
- &::-webkit-scrollbar {
1148
- display: none;
1149
- }
1150
- }
1151
-
1152
- /// Pre (code block wrapper).
1153
- ///
1154
- /// @example scss
1155
- /// .selector {
1156
- /// @include bpk-code__pre();
1157
- /// }
1158
-
1159
- @mixin bpk-code__pre {
1160
- margin: 0 0 tokens.bpk-spacing-base();
1161
- padding: tokens.bpk-spacing-lg();
1162
- background-color: tokens.$bpk-surface-highlight-day;
1163
-
1164
- @include radii.bpk-border-radius-xs;
1165
- }
1166
-
1167
- /// Pre (code block wrapper) alternate style.
1168
- ///
1169
- /// @example scss
1170
- /// .selector {
1171
- /// @include bpk-code__pre();
1172
- /// @include bpk-code__pre--alternate();
1173
- /// }
1174
-
1175
- @mixin bpk-code__pre--alternate {
1176
- background-color: transparent;
1177
-
1178
- @include borders.bpk-border-sm(tokens.$bpk-line-day);
1179
- }
1180
-
1181
- /// Blockquote.
1182
- ///
1183
- /// @example scss
1184
- /// .selector {
1185
- /// @include bpk-blockquote();
1186
- /// }
1187
-
1188
- @mixin bpk-blockquote {
1189
- margin: 0 0 tokens.bpk-spacing-base() 0;
1190
- padding: tokens.bpk-spacing-lg();
1191
-
1192
- @include borders.bpk-border-left-lg(tokens.$bpk-core-accent-day);
1193
- @include borders.bpk-border-left-lg(
1194
- var(--bpk-blockquote-bar-color, tokens.$bpk-core-accent-day)
1195
- );
1196
-
1197
- @include utils.bpk-rtl {
1198
- padding: tokens.bpk-spacing-lg();
1199
- border-left: 0;
1200
-
1201
- @include borders.bpk-border-right-lg(tokens.$bpk-core-accent-day);
1202
- @include borders.bpk-border-right-lg(
1203
- var(--bpk-blockquote-bar-color, tokens.$bpk-core-accent-day)
1204
- );
1205
- }
1206
-
1207
- > *:last-child {
1208
- margin-bottom: 0;
1209
- }
1210
- }
1211
-
1212
- /// Adds additional spacing above and below blockquotes. Modifies the bpk-blockquote mixin.
1213
- ///
1214
- /// @require {mixin} bpk-blockquote
1215
- ///
1216
- /// @example scss
1217
- /// .selector {
1218
- /// @include bpk-blockquote();
1219
- /// @include bpk-blockquote--extra-spacing();
1220
- /// }
1221
-
1222
- @mixin bpk-blockquote--extra-spacing {
1223
- margin-top: tokens.bpk-spacing-xl();
1224
- margin-bottom: tokens.bpk-spacing-xl();
1225
- }