@penskemediacorp/larva-css 1.5.0-alpha.0 → 1.5.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 (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +193 -37
  3. package/__tests__/fixtures/expected.js +29 -0
  4. package/__tests__/lib/generators.test.js +11 -0
  5. package/browser-test-setup.js +26 -0
  6. package/build/css/algorithms.common.async.css +4 -0
  7. package/build/css/algorithms.common.inline.css +21 -0
  8. package/build/css/generic.common.inline.css +4 -0
  9. package/build/css/js.common.async.css +3 -0
  10. package/build/css/js.common.inline.css +6 -0
  11. package/build/css/utilities.common.async.css +8 -0
  12. package/build/css/utilities.common.inline.css +27 -0
  13. package/gulpfile.js +123 -0
  14. package/lib/generators.js +93 -0
  15. package/package.json +14 -15
  16. package/src/01-generic/elements.common.inline.scss +37 -1
  17. package/src/01-generic/forms.common.inline.scss +10 -0
  18. package/src/01-generic/side-skins.common.inline.scss +10 -0
  19. package/src/01-generic/typography.common.inline.scss +24 -13
  20. package/src/02-algorithms/README.md +65 -0
  21. package/src/02-algorithms/a-buy-now/a-buy-now.common.inline.scss +112 -0
  22. package/src/02-algorithms/a-carousel-grid/a-carousel-grid.common.inline.scss +66 -0
  23. package/src/02-algorithms/a-children-border/a-children-border.common.inline.scss +43 -0
  24. package/src/02-algorithms/a-children-link-color/a-children-link-color.common.inline.scss +15 -0
  25. package/src/02-algorithms/a-children-link-decoration/a-children-link-decoration.common.inline.scss +13 -0
  26. package/src/02-algorithms/a-counter/a-counter.common.inline.scss +26 -0
  27. package/src/02-algorithms/a-crop/README.md +17 -13
  28. package/src/02-algorithms/a-crop/a-crop.common.inline.scss +97 -12
  29. package/src/02-algorithms/a-crop/a-crop.html +2 -2
  30. package/src/02-algorithms/a-floated/a-floated.common.inline.scss +32 -0
  31. package/src/02-algorithms/a-font/a-font.common.inline.scss +3 -0
  32. package/src/02-algorithms/a-glue/a-glue.common.inline.scss +63 -6
  33. package/src/02-algorithms/a-glue/a-glue.html +3 -3
  34. package/src/02-algorithms/a-grid/README.md +141 -14
  35. package/src/02-algorithms/a-grid/a-grid.common.inline.scss +58 -6
  36. package/src/02-algorithms/a-grid/a-grid.html +4 -4
  37. package/src/02-algorithms/a-hidden/a-hidden.common.inline.scss +43 -0
  38. package/src/02-algorithms/a-hover-dropup/a-hover-dropup.common.async.scss +9 -8
  39. package/src/02-algorithms/a-hover-dropup/a-hover-dropup.html +3 -3
  40. package/src/02-algorithms/a-hover-effect/a-hover-effect.common.async.scss +25 -0
  41. package/src/02-algorithms/a-hover-effect/a-hover-effect.html +16 -0
  42. package/src/02-algorithms/a-icon/a-icon.common.async.scss +36 -0
  43. package/src/02-algorithms/a-icon/a-icon.common.inline.scss +56 -70
  44. package/src/02-algorithms/a-screen-reader-only/a-screen-reader-only.common.inline.scss +30 -0
  45. package/src/02-algorithms/a-scrollable-grid/a-scrollable-grid.common.inline.scss +52 -0
  46. package/src/02-algorithms/a-show-on-hover/a-show-on-hover.common.inline.scss +16 -0
  47. package/src/02-algorithms/a-space-children/a-space-children.common.inline.scss +88 -17
  48. package/src/02-algorithms/a-truncate-ellipsis/a-truncate-ellipsis.common.async.scss +71 -0
  49. package/src/02-algorithms/a-unstyle-button/a-unstyle-button.common.inline.scss +2 -3
  50. package/src/02-algorithms/a-unstyle-link/a-unstyle-link.common.inline.scss +7 -0
  51. package/src/02-algorithms/a-unstyle-list/a-unstyle-list.common.inline.scss +1 -1
  52. package/src/02-algorithms/a-wrapper/a-wrapper.common.inline.scss +14 -2
  53. package/src/03-utilities/u-background-color.common.async.scss +15 -0
  54. package/src/03-utilities/u-background-color.common.inline.scss +37 -0
  55. package/src/03-utilities/u-border-color.common.async.scss +38 -6
  56. package/src/03-utilities/u-border-radius.common.async.scss +27 -0
  57. package/src/03-utilities/u-border.common.inline.scss +216 -3
  58. package/src/03-utilities/u-box-alignment.common.inline.scss +64 -4
  59. package/src/03-utilities/u-box-shadow.common.async.scss +37 -3
  60. package/src/03-utilities/u-color.common.async.scss +20 -15
  61. package/src/03-utilities/u-color.common.inline.scss +39 -0
  62. package/src/03-utilities/u-cursor.common.async.scss +1 -1
  63. package/src/03-utilities/u-display.common.inline.scss +86 -3
  64. package/src/03-utilities/u-filter.common.async.scss +5 -0
  65. package/src/03-utilities/u-flex.common.inline.scss +128 -9
  66. package/src/03-utilities/u-font-family.common.inline.scss +41 -16
  67. package/src/03-utilities/u-font-size.common.inline.scss +58 -5
  68. package/src/03-utilities/u-font-style.common.inline.scss +9 -0
  69. package/src/03-utilities/u-font-weight.common.inline.scss +50 -12
  70. package/src/03-utilities/u-height.common.inline.scss +41 -5
  71. package/src/03-utilities/u-letter-spacing.common.inline.scss +11 -0
  72. package/src/03-utilities/u-line-height.common.inline.scss +49 -13
  73. package/src/03-utilities/u-list-style.common.async.scss +3 -0
  74. package/src/03-utilities/u-margin.common.inline.scss +186 -46
  75. package/src/03-utilities/u-max-width.common.inline.scss +25 -0
  76. package/src/03-utilities/u-opacity.common.inline.scss +3 -0
  77. package/src/03-utilities/u-order.common.inline.scss +23 -2
  78. package/src/03-utilities/u-overflow.common.inline.scss +15 -0
  79. package/src/03-utilities/u-padding.common.inline.scss +157 -52
  80. package/src/03-utilities/u-position.common.inline.scss +3 -0
  81. package/src/03-utilities/u-text-align.common.inline.scss +32 -3
  82. package/src/03-utilities/u-text-decoration.common.inline.scss +11 -0
  83. package/src/03-utilities/u-text-transform.common.inline.scss +14 -2
  84. package/src/03-utilities/u-transform.common.inline.scss +5 -0
  85. package/src/03-utilities/u-vertical-align.common.inline.scss +7 -0
  86. package/src/03-utilities/u-whitespace.common.inline.scss +1 -1
  87. package/src/03-utilities/u-width.common.inline.scss +191 -7
  88. package/src/04-js/README.md +5 -0
  89. package/src/04-js/js-Collapsible.common.inline.scss +15 -0
  90. package/src/04-js/js-ExpandableSearch.common.async.scss +33 -0
  91. package/src/04-js/js-Flickity.common.async.scss +91 -0
  92. package/src/04-js/js-Header.common.inline.scss +73 -0
  93. package/src/04-js/js-MegaMenu.common.inline.scss +50 -0
  94. package/src/04-js/js-MobileHeightToggle.common.inline.scss +7 -5
  95. package/src/04-js/js-PopOver.common.async.scss +13 -0
  96. package/src/04-js/js-Tooltip.common.inline.scss +17 -0
  97. package/src/04-js/js-VideoShowcase.common.inline.scss +33 -0
  98. package/src/04-js/partials/expandable-search.scss +202 -0
  99. package/src/04-js/partials/flickity.scss +149 -0
  100. package/src/_generated/_a-font.scss +1027 -0
  101. package/src/larva-ui/prism.scss +127 -0
  102. package/src/setup.scss +7 -0
  103. package/stylelint.config.js +45 -0
  104. package/src/01-generic/config.common.inline.scss +0 -20
  105. package/src/02-algorithms/a-glue/index.js +0 -1
  106. package/src/02-algorithms/a-icon/a-icon.html +0 -20
  107. package/src/02-algorithms/a-unstyle-link/a-unstyle-link.common.async.scss +0 -5
  108. package/src/03-utilities/u-background.common.async.scss +0 -14
@@ -1,17 +1,77 @@
1
+ @import 'setup';
1
2
 
2
- .pmc-u-align-items-center {
3
+ .lrv-u-align-items-center {
3
4
  align-items: center;
4
5
  }
5
6
 
6
- .pmc-u-justify-content-center {
7
+ .lrv-u-justify-content-center {
7
8
  justify-content: center;
8
9
  }
9
10
 
10
- .pmc-u-justify-content-space-evenly {
11
+ .lrv-u-justify-content-space-evenly {
11
12
  justify-content: space-evenly;
12
13
  }
13
14
 
14
- .pmc-u-justify-content-space-between {
15
+ .lrv-u-justify-content-space-between {
15
16
  justify-content: space-between;
16
17
  }
17
18
 
19
+ .lrv-u-align-items-start {
20
+ align-items: flex-start;
21
+ }
22
+
23
+ .lrv-u-justify-content-start {
24
+ justify-content: flex-start;
25
+ }
26
+
27
+ .lrv-u-justify-content-end {
28
+ justify-content: flex-end;
29
+ }
30
+
31
+ .lrv-u-align-items-end {
32
+ align-items: flex-start;
33
+ }
34
+
35
+ .lrv-u-align-items-stretch {
36
+ align-items: stretch;
37
+ }
38
+
39
+ @include pmc-breakpoint( desktop ) {
40
+ .lrv-u-align-items-center\@desktop {
41
+ align-items: center;
42
+ }
43
+
44
+ .lrv-u-justify-content-center\@desktop {
45
+ justify-content: center;
46
+ }
47
+
48
+ .lrv-u-justify-content-space-evenly\@desktop {
49
+ justify-content: space-evenly;
50
+ }
51
+
52
+ .lrv-u-justify-content-space-between\@desktop {
53
+ justify-content: space-between;
54
+ }
55
+
56
+ .lrv-u-align-items-start\@desktop {
57
+ align-items: flex-start;
58
+ }
59
+
60
+ .lrv-u-justify-content-start\@desktop {
61
+ justify-content: flex-start;
62
+ }
63
+
64
+ .lrv-u-justify-content-end\@desktop {
65
+ justify-content: flex-end;
66
+ }
67
+
68
+ .lrv-u-align-items-end\@desktop {
69
+ align-items: flex-start;
70
+ }
71
+ }
72
+
73
+ .lrv-u-justify-content-center\@tablet {
74
+ @include pmc-breakpoint( tablet ) {
75
+ justify-content: center;
76
+ }
77
+ }
@@ -1,4 +1,38 @@
1
+ @import 'setup';
1
2
 
2
- .pmc-u-box-shadow-medium\@tablet {
3
- box-shadow: 0 -0.313rem 0.313rem rgba( 0, 0, 0, 0.15 );
4
- }
3
+ @each $token, $value in $TOKENS-MAP {
4
+ $token-str: quote( $token );
5
+
6
+ // example: box-shadow, 0 0 2px rgba(0,0,0,0.5)
7
+ @if str-index( $token-str, 'box-shadow' ) {
8
+ .lrv-u-#{$token} {
9
+ box-shadow: $value;
10
+ box-shadow: var( --#{$token}, #{$value} );
11
+ }
12
+ }
13
+ }
14
+
15
+
16
+ @each $token, $value in $TOKENS-MAP {
17
+ $token-str: quote( $token );
18
+
19
+ // example: box-shadow, 0 0 2px rgba(0,0,0,0.5)
20
+ @if str-index( $token-str, 'box-shadow' ) {
21
+
22
+ @include pmc-breakpoint( desktop ) {
23
+
24
+ .lrv-u-#{$token}\@desktop {
25
+ box-shadow: $value;
26
+ box-shadow: var( --#{$token}, #{$value} );
27
+ }
28
+ }
29
+ }
30
+ }
31
+
32
+ // Legacy Utility
33
+
34
+ .lrv-u-box-shadow-medium\@tablet {
35
+ @include pmc-breakpoint( tablet ) {
36
+ box-shadow: 0 -0.313rem 0.313rem rgba( 0, 0, 0, 0.15 );
37
+ }
38
+ }
@@ -1,22 +1,27 @@
1
- @import '@penskemediacorp/larva-scss/dist/tokens';
2
- @import '@penskemediacorp/larva-scss/dist/tools';
1
+ @import 'setup';
3
2
 
4
- .pmc-u-color-grey-medium-light {
5
- color: #{map-get( $semantic-color-list, grey-medium-light )};
6
- color: var( --color-grey-medium-light );
7
- }
3
+ @each $token, $value in $TOKENS-MAP {
4
+ $token-str: quote( $token );
5
+
6
+ // example: color-grey-lightest, #EEEEEE
7
+ @if str-index( $token-str, 'color' )
8
+ and not str-index( $token-str, 'background' )
9
+ and not str-index( $token-str, 'border' ) {
8
10
 
9
- .pmc-u-color-grey {
10
- color: #{map-get( $semantic-color-list, grey )};
11
- color: var( --color-grey );
11
+ .lrv-u-#{$token}\:hover:hover {
12
+ color: $value;
13
+ color: var( --#{$token}, #{$value} );
14
+ }
15
+ }
12
16
  }
13
17
 
14
- .pmc-u-color-grey-medium-dark {
15
- color: #{map-get( $semantic-color-list, grey-medium-dark )};
16
- color: var( --color-grey-medium-dark );
18
+
19
+ // Static Utilities
20
+
21
+ .lrv-u-color-currentColor {
22
+ color: currentColor;
17
23
  }
18
24
 
19
- .pmc-u-color-white\:hover:hover {
20
- color: map-get( $semantic-color-list, white );
21
- // background-color: var( --color-brand-red );
25
+ .lrv-u-color-transparent {
26
+ color: transparent;
22
27
  }
@@ -0,0 +1,39 @@
1
+ @import 'setup';
2
+
3
+ @each $token, $value in $TOKENS-MAP {
4
+ $token-str: quote( $token );
5
+
6
+ // example: color-grey-lightest, #EEEEEE
7
+ @if str-index( $token-str, 'color' )
8
+ and not str-index( $token-str, 'background' )
9
+ and not str-index( $token-str, 'border' ) {
10
+
11
+ .lrv-u-#{$token} {
12
+ color: $value;
13
+ color: var( --#{$token}, #{$value} );
14
+ }
15
+ }
16
+ }
17
+
18
+ //
19
+ // Media Queries
20
+ //
21
+
22
+
23
+ @each $token, $value in $TOKENS-MAP {
24
+ $token-str: quote( $token );
25
+
26
+ // example: color-grey-lightest, #EEEEEE
27
+ @if str-index( $token-str, 'color' )
28
+ and not str-index( $token-str, 'background' )
29
+ and not str-index( $token-str, 'border' ) {
30
+
31
+ .lrv-u-#{$token}\@desktop {
32
+
33
+ @include pmc-breakpoint( desktop ) {
34
+ color: $value;
35
+ color: var( --#{$token}, #{$value} );
36
+ }
37
+ }
38
+ }
39
+ }
@@ -1,3 +1,3 @@
1
- .pmc-u-cursor-pointer {
1
+ .lrv-u-cursor-pointer {
2
2
  cursor: pointer;
3
3
  }
@@ -1,11 +1,94 @@
1
- .pmc-u-display-block {
1
+ @import 'setup';
2
+
3
+ .lrv-u-display-block {
2
4
  display: block;
3
5
  }
4
6
 
5
- .pmc-u-display-inline {
7
+ .lrv-u-display-contents {
8
+ display: contents;
9
+ }
10
+
11
+ .lrv-u-display-inline {
6
12
  display: inline;
7
13
  }
8
14
 
9
- .pmc-u-display-inline-block {
15
+ .lrv-u-display-inline-block {
10
16
  display: inline-block;
11
17
  }
18
+
19
+ .lrv-u-display-none {
20
+ display: none;
21
+ }
22
+
23
+ .lrv-u-display-table {
24
+ display: table;
25
+ }
26
+
27
+ .lrv-u-display-inline-flex {
28
+ display: inline-flex;
29
+ }
30
+
31
+ @include pmc-breakpoint( desktop ) {
32
+
33
+ .lrv-u-display-block\@desktop {
34
+ display: block;
35
+ }
36
+
37
+ .lrv-u-display-contents\@desktop {
38
+ display: contents;
39
+ }
40
+
41
+ .lrv-u-display-inline\@desktop {
42
+ display: inline;
43
+ }
44
+
45
+ .lrv-u-display-inline-block\@desktop {
46
+ display: inline-block;
47
+ }
48
+
49
+ .lrv-u-display-none\@desktop {
50
+ display: none;
51
+ }
52
+
53
+ .lrv-u-display-inline-flex\@desktop {
54
+ display: inline-flex;
55
+ }
56
+ }
57
+
58
+ @include pmc-breakpoint( desktop-xl ) {
59
+
60
+ .lrv-u-display-none\@desktop-xl {
61
+ display: none;
62
+ }
63
+
64
+ .lrv-u-display-block\@desktop-xl {
65
+ display: block;
66
+ }
67
+ }
68
+
69
+ // Legacy
70
+ .lrv-u-display-none\@mobile-max {
71
+ @include pmc-breakpoint( mobile-max ) {
72
+ display: none;
73
+ }
74
+ }
75
+
76
+ .lrv-u-display-none\:first-child\@desktop-max {
77
+ @include pmc-breakpoint( desktop-max ) {
78
+ &> *:first-child {
79
+ display: none;
80
+ }
81
+ }
82
+ }
83
+
84
+ .lrv-u-display-inline-block\@mobile-max {
85
+ @include pmc-breakpoint( mobile-max ) {
86
+ display: inline-block;
87
+ }
88
+ }
89
+
90
+ .lrv-u-display-block\@mobile-max {
91
+ @include pmc-breakpoint( mobile-max ) {
92
+ display: block;
93
+ }
94
+ }
@@ -0,0 +1,5 @@
1
+ @import 'setup';
2
+
3
+ .lrv-u-filter-grayscale-100 {
4
+ filter: grayscale(100%);
5
+ }
@@ -1,27 +1,146 @@
1
- @import '@penskemediacorp/larva-scss/dist/tools';
1
+ @import 'setup';
2
2
 
3
- .pmc-u-flex {
3
+ $flex_basis: ( 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 );
4
+ $breakpoints: (
5
+ '',
6
+ 'mobile-max',
7
+ 'desktop',
8
+ 'desktop-xl'
9
+ );
10
+
11
+ .lrv-u-flex {
4
12
  display: flex;
5
13
  }
6
14
 
7
- .pmc-u-flex\@tablet {
15
+ .lrv-u-flex-grow-1 {
16
+ flex-grow: 1;
17
+ }
18
+
19
+ .lrv-u-flex-shrink-0 {
20
+ flex-shrink: 0;
21
+ }
22
+
23
+ .lrv-u-flex-wrap-wrap {
24
+ flex-wrap: wrap;
25
+ }
26
+
27
+ .lrv-u-flex-direction-column {
28
+ flex-direction: column;
29
+ }
30
+
31
+ @include pmc-breakpoint( desktop ) {
32
+
33
+ .lrv-u-flex\@desktop {
34
+ display: flex;
35
+ }
36
+
37
+ .lrv-u-flex-grow-1\@desktop {
38
+ flex-grow: 1;
39
+ }
40
+
41
+ .lrv-u-flex-shrink-0\@desktop {
42
+ flex-shrink: 0;
43
+ }
44
+
45
+ .lrv-u-flex-wrap-wrap\@desktop {
46
+ flex-wrap: wrap;
47
+ }
48
+
49
+ .lrv-u-flex-direction-column\@desktop {
50
+ flex-direction: column;
51
+ }
52
+
53
+ }
54
+
55
+ // Legacy - should not use @tablet and @mobile-max
56
+
57
+ .lrv-u-flex\@tablet {
8
58
 
9
59
  @include pmc-breakpoint( tablet ) {
10
60
  display: flex;
11
61
  }
12
62
  }
13
63
 
14
- .pmc-u-flex-grow-1 {
15
- flex-grow: 1;
64
+ .lrv-u-flex\@desktop-xl-max {
65
+ @include pmc-breakpoint( desktop-xl-max ) {
66
+ display: flex;
67
+ }
16
68
  }
17
69
 
18
- .pmc-u-flex-direction-column {
19
- flex-direction: column;
70
+ .lrv-u-flex-direction-row-reverse\@desktop-xl-max {
71
+ @include pmc-breakpoint( desktop-xl-max ) {
72
+ flex-direction: row-reverse;
73
+ }
20
74
  }
21
75
 
22
- .pmc-u-flex-direction-column\@mobile-max {
76
+ .lrv-u-flex-direction-column\@tablet {
77
+
78
+ @include pmc-breakpoint( tablet ) {
79
+ flex-direction: column;
80
+ }
81
+ }
82
+
83
+ .lrv-u-flex-direction-column\@mobile-max {
23
84
 
24
85
  @include pmc-breakpoint( mobile-max ) {
25
86
  flex-direction: column;
26
87
  }
27
- }
88
+ }
89
+
90
+ .lrv-u-flex-direction-column\@desktop-xl {
91
+ @include pmc-breakpoint( desktop-xl ) {
92
+ flex-direction: column;
93
+ }
94
+ }
95
+
96
+ .lrv-u-flex-direction-column\@desktop-xl-max {
97
+ @include pmc-breakpoint(desktop-xl-max) {
98
+ flex-direction: column;
99
+ }
100
+ }
101
+
102
+ .lrv-u-flex-wrap-wrap\@mobile-max {
103
+ @include pmc-breakpoint(mobile-max) {
104
+ flex-wrap: wrap;
105
+ }
106
+ }
107
+
108
+ .lrv-u-flex-direction-column-reverse\@mobile-max {
109
+ @include pmc-breakpoint(mobile-max) {
110
+ flex-direction: column-reverse;
111
+ }
112
+ }
113
+
114
+ .lrv-u-flex-basis-100p\@desktop-xl-max {
115
+ @include pmc-breakpoint( desktop-xl-max ) {
116
+ flex-basis: 100%;
117
+ }
118
+ }
119
+
120
+ .lrv-u-flex-shrink-0\@mobile-max {
121
+ @include pmc-breakpoint( mobile-max ) {
122
+ flex-shrink: 0;
123
+ }
124
+ }
125
+
126
+ @each $breakpoint in $breakpoints {
127
+
128
+ @each $size in $flex_basis {
129
+ $per : #{$size}#{'%'};
130
+
131
+ @if '' == $breakpoint {
132
+ // No breakpoint
133
+ .lrv-u-flex-basis-#{$size}p {
134
+ flex-basis: $per;
135
+ }
136
+ } @else {
137
+ @include pmc-breakpoint( #{$breakpoint} ) {
138
+ .lrv-u-flex-basis-#{$size}p\@#{$breakpoint} {
139
+ flex-basis: $per;
140
+ }
141
+ }
142
+ }
143
+
144
+ } // end flex loop
145
+
146
+ } // end breakpoints loop
@@ -1,21 +1,46 @@
1
- // TODO:
2
- // The pmc-u-font-family generator can be used for brands that need A-grade support for IE11,
3
- // and a PostCSS script can be created to include the basic generator verison according to
4
- // configuraiton in larva.config.js.
5
-
6
- .wf-active {
7
- --font-family-primary: var( --font-family-primary-fancy );
8
- --font-family-secondary: var( --font-family-secondary-fancy );
9
- }
1
+ @import 'setup';
10
2
 
11
- .pmc-u-font-family-primary {
12
- font-family: var( --font-family-primary );
13
- }
3
+ $warned-font-family: false;
4
+
5
+ @each $token, $value in $TOKENS-MAP {
6
+ $token-str: quote( $token );
7
+
8
+ @if $warned-font-family == false {
9
+ @warn 'Font family utilities will be will be deprecated. Please set up a-font using a style guide.';
10
+ $warned-font-family: true;
11
+ }
12
+
13
+ // example: font-family-primary-fancy, 'Graphik', sans-serif
14
+ // example: font-family-primary, Helvetica
15
+ @if str-index( $token-str, 'font-family' ) and not str-index( $token-str, '-font-family-' ) {
14
16
 
15
- .pmc-u-font-family-secondary {
16
- font-family: var( --font-family-secondary );
17
+ // The webfont/'fancy' variation is added via custom property
18
+ // in generic/typography
19
+ @if not str-index( $token-str, 'fancy' ) {
20
+ .lrv-u-#{$token} {
21
+ font-family: $value;
22
+ font-family: var( --#{$token}, #{$value} );
23
+ }
24
+ }
25
+ }
17
26
  }
18
27
 
19
- .pmc-u-font-family-basic {
20
- font-family: Helvetica, sans-serif;
28
+ //
29
+ // Media Queries
30
+ //
31
+
32
+
33
+ @each $token, $value in $TOKENS-MAP {
34
+ $token-str: quote( $token );
35
+
36
+ @if str-index( $token-str, 'font-family' ) and not str-index( $token-str, '-font-family-' ) {
37
+
38
+ @if not str-index( $token-str, 'fancy' ) {
39
+
40
+ .lrv-u-#{$token}\@desktop {
41
+ font-family: $value;
42
+ font-family: var( --#{$token}, #{$value} );
43
+ }
44
+ }
45
+ }
21
46
  }
@@ -1,7 +1,17 @@
1
- @import '@penskemediacorp/larva-scss/dist/tokens';
2
- @import '@penskemediacorp/larva-scss/dist/generators';
1
+ @import 'setup';
3
2
 
4
- @include pmc-u-font-size(
3
+ @each $token, $value in $TOKENS-MAP {
4
+ $token-str: quote( $token );
5
+
6
+ @if str-index( $token-str, 'font-size' ) and not str-index( $token-str, '-font-size-' ) {
7
+ .lrv-u-#{$token} {
8
+ font-size: $value;
9
+ }
10
+ }
11
+ }
12
+
13
+ // Generates classes .lrv-u-font-size-{int}
14
+ @include u-font-size(
5
15
  (
6
16
  ($font-size-8,)
7
17
  ($font-size-10,)
@@ -17,8 +27,10 @@
17
27
  ($font-size-40,)
18
28
  ($font-size-50,)
19
29
  ($font-size-86,)
30
+ ($font-size-8, mobile-max)
20
31
  ($font-size-12, mobile-max)
21
32
  ($font-size-14, mobile-max)
33
+ ($font-size-16, mobile-max)
22
34
  ($font-size-18, mobile-max)
23
35
  ($font-size-22, mobile-max)
24
36
  ($font-size-26, mobile-max)
@@ -42,5 +54,46 @@
42
54
  ($font-size-32, desktop-xl,)
43
55
  ($font-size-28, desktop-xl,)
44
56
  ($font-size-46, desktop-xl,)
45
- )
46
- );
57
+ ), $NAMESPACE: 'lrv-' );
58
+
59
+
60
+ //
61
+ // Media Queries
62
+ //
63
+
64
+
65
+ @each $token, $value in $TOKENS-MAP {
66
+ $token-str: quote( $token );
67
+
68
+ @if str-index( $token-str, 'font-size' ) and not str-index( $token-str, '-font-size-' ) {
69
+
70
+ @include pmc-breakpoint( desktop ) {
71
+ .lrv-u-#{$token}\@desktop {
72
+ font-size: $value;
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+ @each $token, $value in $TOKENS-MAP {
79
+ $token-str: quote( $token );
80
+
81
+ @if str-index( $token-str, 'font-size' ) and not str-index( $token-str, '-font-size-' ) {
82
+
83
+ @include pmc-breakpoint( desktop-xl ) {
84
+ .lrv-u-#{$token}\@desktop-xl {
85
+ font-size: $value;
86
+ }
87
+ }
88
+ }
89
+ }
90
+
91
+ .lrv-u-font-size-13 {
92
+ font-size: pmc-rem(13);
93
+ }
94
+
95
+ .lrv-u-font-size-13\@mobile-max {
96
+ @include pmc-breakpoint( mobile-max ) {
97
+ font-size: pmc-rem(13);
98
+ }
99
+ }
@@ -0,0 +1,9 @@
1
+ @import 'setup';
2
+
3
+ .lrv-u-font-style-italic {
4
+ font-style: italic;
5
+ }
6
+
7
+ .lrv-u-font-style-normal {
8
+ font-style: normal;
9
+ }
@@ -1,12 +1,50 @@
1
- @import '@penskemediacorp/larva-scss/dist/tokens';
2
- @import '@penskemediacorp/larva-scss/dist/generators';
3
-
4
- // Generates classes .pmc-u-font-weight-#.
5
- @include pmc-u-font-weight(
6
- (
7
- light,
8
- normal,
9
- bold
10
- ),
11
- $semantic-font-weights
12
- );
1
+ @import 'setup';
2
+
3
+ $warned-font-weight: false;
4
+
5
+ @each $token, $value in $TOKENS-MAP {
6
+
7
+ @if $warned-font-weight == false {
8
+ @warn 'Font weight utilities will be will be deprecated. Please set up a-font using a style guide.';
9
+ $warned-font-weight: true;
10
+ }
11
+
12
+ $token-str: quote( $token );
13
+
14
+ @if str-index( $token-str, 'font-weight' ) and not str-index( $token-str, '-font-weight-' ) {
15
+ .lrv-u-#{$token} {
16
+ font-weight: $value;
17
+ }
18
+ }
19
+ }
20
+
21
+
22
+ //
23
+ // Media Queries
24
+ //
25
+
26
+ @each $token, $value in $TOKENS-MAP {
27
+ $token-str: quote( $token );
28
+
29
+ @if str-index( $token-str, 'font-weight' ) and not str-index( $token-str, '-font-weight-' ) {
30
+
31
+ @include pmc-breakpoint( desktop ) {
32
+ .lrv-u-#{$token}\@desktop {
33
+ font-weight: $value;
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ @each $token, $value in $TOKENS-MAP {
40
+ $token-str: quote( $token );
41
+
42
+ @if str-index( $token-str, 'font-weight' ) and not str-index( $token-str, '-font-weight-' ) {
43
+
44
+ @include pmc-breakpoint( desktop-xl ) {
45
+ .lrv-u-#{$token}\@desktop-xl {
46
+ font-weight: $value;
47
+ }
48
+ }
49
+ }
50
+ }