@madgex/design-system 1.14.1 → 1.15.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/dist/_tokens/css/_tokens.css +2 -1
- package/dist/_tokens/js/_tokens-module.js +20 -1
- package/dist/_tokens/scss/_tokens.scss +5 -1
- package/dist/css/index.css +41 -41
- package/package.json +1 -1
- package/src/scss/functions/__index.scss +1 -0
- package/src/scss/functions/_px2rem.scss +20 -0
- package/src/scss/helpers/_font-types.scss +2 -2
- package/src/scss/index.scss +1 -1
- package/src/tokens/font.json +5 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu, 11 Jul 2019
|
|
3
|
+
* Generated on Thu, 11 Jul 2019 14:20:25 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
--mds-color-text-invert: #ffffff;
|
|
32
32
|
--mds-color-border: #979797;
|
|
33
33
|
--mds-font-family-base: "Helvetica", Arial, sans-serif;
|
|
34
|
+
--mds-font-size-base: 16px;
|
|
34
35
|
--mds-font-type-canon-default-size: 28px;
|
|
35
36
|
--mds-font-type-canon-default-line-height: 1.15;
|
|
36
37
|
--mds-font-type-canon-sm-size: 32px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu, 11 Jul 2019
|
|
3
|
+
* Generated on Thu, 11 Jul 2019 14:20:25 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
@@ -534,6 +534,25 @@ module.exports = {
|
|
|
534
534
|
]
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
|
+
"size": {
|
|
538
|
+
"base": {
|
|
539
|
+
"value": "16px",
|
|
540
|
+
"original": {
|
|
541
|
+
"value": "16px"
|
|
542
|
+
},
|
|
543
|
+
"name": "MdsFontSizeBase",
|
|
544
|
+
"attributes": {
|
|
545
|
+
"category": "font",
|
|
546
|
+
"type": "size",
|
|
547
|
+
"item": "base"
|
|
548
|
+
},
|
|
549
|
+
"path": [
|
|
550
|
+
"font",
|
|
551
|
+
"size",
|
|
552
|
+
"base"
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
},
|
|
537
556
|
"type": {
|
|
538
557
|
"canon": {
|
|
539
558
|
"default": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
3
|
Do not edit directly
|
|
4
|
-
Generated on Thu, 11 Jul 2019
|
|
4
|
+
Generated on Thu, 11 Jul 2019 14:20:25 GMT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
$mds-color-brand-1-base: #1b75bb !default;
|
|
@@ -31,6 +31,7 @@ $mds-color-text-base: #222222 !default;
|
|
|
31
31
|
$mds-color-text-invert: #ffffff !default;
|
|
32
32
|
$mds-color-border: #979797 !default;
|
|
33
33
|
$mds-font-family-base: "Helvetica", Arial, sans-serif !default;
|
|
34
|
+
$mds-font-size-base: 16px !default;
|
|
34
35
|
$mds-font-type-canon-default-size: 28px !default;
|
|
35
36
|
$mds-font-type-canon-default-line-height: 1.15 !default;
|
|
36
37
|
$mds-font-type-canon-sm-size: 32px !default;
|
|
@@ -174,6 +175,9 @@ $tokens: (
|
|
|
174
175
|
'family': (
|
|
175
176
|
'base': $mds-font-family-base
|
|
176
177
|
),
|
|
178
|
+
'size': (
|
|
179
|
+
'base': $mds-font-size-base
|
|
180
|
+
),
|
|
177
181
|
'type': (
|
|
178
182
|
'canon': (
|
|
179
183
|
'default': (
|
package/dist/css/index.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Do not edit directly
|
|
3
|
-
Generated on Thu, 11 Jul 2019
|
|
3
|
+
Generated on Thu, 11 Jul 2019 14:20:25 GMT
|
|
4
4
|
*/
|
|
5
5
|
html,
|
|
6
6
|
body,
|
|
@@ -430,261 +430,261 @@ template {
|
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
.mds-font-canon, h1 {
|
|
433
|
-
font-size:
|
|
433
|
+
font-size: 1.75rem;
|
|
434
434
|
line-height: 1.15;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
@media (min-width: 25em) {
|
|
438
438
|
.mds-font-canon, h1 {
|
|
439
|
-
font-size:
|
|
439
|
+
font-size: 2rem;
|
|
440
440
|
line-height: 1.13;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
@media (min-width: 37.5em) {
|
|
445
445
|
.mds-font-canon, h1 {
|
|
446
|
-
font-size:
|
|
446
|
+
font-size: 3.25rem;
|
|
447
447
|
line-height: 1.08;
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
|
|
451
451
|
@media (min-width: 63em) {
|
|
452
452
|
.mds-font-canon, h1 {
|
|
453
|
-
font-size:
|
|
453
|
+
font-size: 2.75rem;
|
|
454
454
|
line-height: 1.1;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
.mds-font-trafalgar, h2 {
|
|
459
|
-
font-size:
|
|
459
|
+
font-size: 1.25rem;
|
|
460
460
|
line-height: 1.2;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
@media (min-width: 25em) {
|
|
464
464
|
.mds-font-trafalgar, h2 {
|
|
465
|
-
font-size:
|
|
465
|
+
font-size: 1.5rem;
|
|
466
466
|
line-height: 1.17;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
@media (min-width: 37.5em) {
|
|
471
471
|
.mds-font-trafalgar, h2 {
|
|
472
|
-
font-size:
|
|
472
|
+
font-size: 2.25rem;
|
|
473
473
|
line-height: 1.12;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
@media (min-width: 63em) {
|
|
478
478
|
.mds-font-trafalgar, h2 {
|
|
479
|
-
font-size:
|
|
479
|
+
font-size: 2rem;
|
|
480
480
|
line-height: 1.13;
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
.mds-font-paragon, h3 {
|
|
485
|
-
font-size:
|
|
485
|
+
font-size: 1.25rem;
|
|
486
486
|
line-height: 1.2;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
@media (min-width: 25em) {
|
|
490
490
|
.mds-font-paragon, h3 {
|
|
491
|
-
font-size:
|
|
491
|
+
font-size: 1.375rem;
|
|
492
492
|
line-height: 1.19;
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
@media (min-width: 37.5em) {
|
|
497
497
|
.mds-font-paragon, h3 {
|
|
498
|
-
font-size:
|
|
498
|
+
font-size: 1.75rem;
|
|
499
499
|
line-height: 1.15;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
@media (min-width: 63em) {
|
|
504
504
|
.mds-font-paragon, h3 {
|
|
505
|
-
font-size:
|
|
505
|
+
font-size: 1.75rem;
|
|
506
506
|
line-height: 1.15;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.mds-font-double-pica, h4 {
|
|
511
|
-
font-size:
|
|
511
|
+
font-size: 1.25rem;
|
|
512
512
|
line-height: 1.2;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
@media (min-width: 25em) {
|
|
516
516
|
.mds-font-double-pica, h4 {
|
|
517
|
-
font-size:
|
|
517
|
+
font-size: 1.25rem;
|
|
518
518
|
line-height: 1.2;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
@media (min-width: 37.5em) {
|
|
523
523
|
.mds-font-double-pica, h4 {
|
|
524
|
-
font-size:
|
|
524
|
+
font-size: 1.625rem;
|
|
525
525
|
line-height: 1.16;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
@media (min-width: 63em) {
|
|
530
530
|
.mds-font-double-pica, h4 {
|
|
531
|
-
font-size:
|
|
531
|
+
font-size: 1.5rem;
|
|
532
532
|
line-height: 1.17;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
.mds-font-great-primer, .js .mds-tabs__list-item {
|
|
537
|
-
font-size:
|
|
537
|
+
font-size: 1.125rem;
|
|
538
538
|
line-height: 1.23;
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
@media (min-width: 25em) {
|
|
542
542
|
.mds-font-great-primer, .js .mds-tabs__list-item {
|
|
543
|
-
font-size:
|
|
543
|
+
font-size: 1.125rem;
|
|
544
544
|
line-height: 1.23;
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
@media (min-width: 37.5em) {
|
|
549
549
|
.mds-font-great-primer, .js .mds-tabs__list-item {
|
|
550
|
-
font-size:
|
|
550
|
+
font-size: 1.3125rem;
|
|
551
551
|
line-height: 1.15;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
@media (min-width: 63em) {
|
|
556
556
|
.mds-font-great-primer, .js .mds-tabs__list-item {
|
|
557
|
-
font-size:
|
|
557
|
+
font-size: 1.25rem;
|
|
558
558
|
line-height: 1.2;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
.mds-font-body-copy, body {
|
|
563
|
-
font-size:
|
|
563
|
+
font-size: 0.875rem;
|
|
564
564
|
line-height: 1.43;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
567
|
@media (min-width: 25em) {
|
|
568
568
|
.mds-font-body-copy, body {
|
|
569
|
-
font-size:
|
|
569
|
+
font-size: 1rem;
|
|
570
570
|
line-height: 1.38;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
@media (min-width: 37.5em) {
|
|
575
575
|
.mds-font-body-copy, body {
|
|
576
|
-
font-size:
|
|
576
|
+
font-size: 1.125rem;
|
|
577
577
|
line-height: 1.34;
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
@media (min-width: 63em) {
|
|
582
582
|
.mds-font-body-copy, body {
|
|
583
|
-
font-size:
|
|
583
|
+
font-size: 1rem;
|
|
584
584
|
line-height: 1.38;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
.mds-font-pica {
|
|
589
|
-
font-size:
|
|
589
|
+
font-size: 0.9375rem;
|
|
590
590
|
line-height: 1.34;
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
@media (min-width: 25em) {
|
|
594
594
|
.mds-font-pica {
|
|
595
|
-
font-size:
|
|
595
|
+
font-size: 1rem;
|
|
596
596
|
line-height: 1.25;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
@media (min-width: 37.5em) {
|
|
601
601
|
.mds-font-pica {
|
|
602
|
-
font-size:
|
|
602
|
+
font-size: 1.125rem;
|
|
603
603
|
line-height: 1.23;
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
@media (min-width: 63em) {
|
|
608
608
|
.mds-font-pica {
|
|
609
|
-
font-size:
|
|
609
|
+
font-size: 1rem;
|
|
610
610
|
line-height: 1.25;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
.mds-font-long-primer {
|
|
615
|
-
font-size:
|
|
615
|
+
font-size: 0.9375rem;
|
|
616
616
|
line-height: 1.2;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
@media (min-width: 25em) {
|
|
620
620
|
.mds-font-long-primer {
|
|
621
|
-
font-size:
|
|
621
|
+
font-size: 0.9375rem;
|
|
622
622
|
line-height: 1.2;
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
@media (min-width: 37.5em) {
|
|
627
627
|
.mds-font-long-primer {
|
|
628
|
-
font-size:
|
|
628
|
+
font-size: 0.9375rem;
|
|
629
629
|
line-height: 1.34;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
@media (min-width: 63em) {
|
|
634
634
|
.mds-font-long-primer {
|
|
635
|
-
font-size:
|
|
635
|
+
font-size: 0.875rem;
|
|
636
636
|
line-height: 1.29;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
.mds-font-brevier {
|
|
641
|
-
font-size:
|
|
641
|
+
font-size: 0.875rem;
|
|
642
642
|
line-height: 1.15;
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
@media (min-width: 25em) {
|
|
646
646
|
.mds-font-brevier {
|
|
647
|
-
font-size:
|
|
647
|
+
font-size: 0.875rem;
|
|
648
648
|
line-height: 1.29;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
@media (min-width: 37.5em) {
|
|
653
653
|
.mds-font-brevier {
|
|
654
|
-
font-size:
|
|
654
|
+
font-size: 0.875rem;
|
|
655
655
|
line-height: 1.29;
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
@media (min-width: 63em) {
|
|
660
660
|
.mds-font-brevier {
|
|
661
|
-
font-size:
|
|
661
|
+
font-size: 0.8125rem;
|
|
662
662
|
line-height: 1.24;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
.mds-font-minion, .mds-list__key {
|
|
667
|
-
font-size:
|
|
667
|
+
font-size: 0.75rem;
|
|
668
668
|
line-height: 1.34;
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
@media (min-width: 25em) {
|
|
672
672
|
.mds-font-minion, .mds-list__key {
|
|
673
|
-
font-size:
|
|
673
|
+
font-size: 0.75rem;
|
|
674
674
|
line-height: 1.34;
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
@media (min-width: 37.5em) {
|
|
679
679
|
.mds-font-minion, .mds-list__key {
|
|
680
|
-
font-size:
|
|
680
|
+
font-size: 0.8125rem;
|
|
681
681
|
line-height: 1.24;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
@media (min-width: 63em) {
|
|
686
686
|
.mds-font-minion, .mds-list__key {
|
|
687
|
-
font-size:
|
|
687
|
+
font-size: 0.75rem;
|
|
688
688
|
line-height: 1.34;
|
|
689
689
|
}
|
|
690
690
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// Convert pixels to rems
|
|
2
|
+
///
|
|
3
|
+
/// @param {Number} $px - value to convert
|
|
4
|
+
/// @param {Number} $base-size ($mds-font-size-base) - `<body>` font size
|
|
5
|
+
///
|
|
6
|
+
/// @example scss
|
|
7
|
+
/// $font-size-in-rems: px2rem(16px);
|
|
8
|
+
/// p { font-size: px2rem(16px); }
|
|
9
|
+
///
|
|
10
|
+
/// @requires $mds-font-size-base
|
|
11
|
+
/// @returns {Number}
|
|
12
|
+
@function px2rem($px, $base-size: $mds-font-size-base) {
|
|
13
|
+
@if unitless($px) {
|
|
14
|
+
@warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
|
|
15
|
+
@return px2rem($px * 1px, $base-size);
|
|
16
|
+
} @else if unit($px) == rem {
|
|
17
|
+
@return $px;
|
|
18
|
+
}
|
|
19
|
+
@return ($px / $base-size) * 1rem;
|
|
20
|
+
}
|
|
@@ -24,11 +24,11 @@ $font-types: map-get(map-get($tokens, 'font'), 'type');
|
|
|
24
24
|
.mds-font-#{$typename} {
|
|
25
25
|
@each $bpname, $props in $typevalue {
|
|
26
26
|
@if $bpname == 'default' {
|
|
27
|
-
font-size: map-get($props, 'size');
|
|
27
|
+
font-size: px2rem(map-get($props, 'size'));
|
|
28
28
|
line-height: map-get($props, 'line-height');
|
|
29
29
|
} @else {
|
|
30
30
|
@include mq($from: $bpname) {
|
|
31
|
-
font-size: map-get($props, 'size');
|
|
31
|
+
font-size: px2rem(map-get($props, 'size'));
|
|
32
32
|
line-height: map-get($props, 'line-height');
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/scss/index.scss
CHANGED