|
45 | 45 | -webkit-font-smoothing: antialiased;
|
46 | 46 | -moz-osx-font-smoothing: grayscale;
|
47 | 47 |
|
48 |
| - $this: bem--selector-to-string(&); |
49 |
| - $selector: bem--extract-first-selector($this); |
50 |
| - |
51 |
| - // Maps type scale typographic categories |
52 |
| - // to native elements. |
53 |
| - $category-element-map: ( |
54 |
| - h1: 'h1', |
55 |
| - h2: 'h2', |
56 |
| - h3: 'h3', |
57 |
| - h4: 'h4', |
58 |
| - h5: 'h5', |
59 |
| - h6: 'h6', |
60 |
| - body-1: 'p' |
61 |
| - ); |
62 |
| - |
63 |
| - @each $category, $type-style in $type-scale { |
64 |
| - // Get the native element that uses typographic styles directly |
65 |
| - // as mapped in the $category-element-map |
66 |
| - $e: map-get($category-element-map, $category); |
67 |
| - |
68 |
| - // Create a placeholder selector with styles for each |
69 |
| - // typographic style to be able to easily extend it |
70 |
| - // elsewhere. |
71 |
| - %#{$category} { |
72 |
| - @include igx-type-style($type-scale, $category); |
73 |
| - } |
74 |
| - |
75 |
| - // Add native element typographic styles. |
76 |
| - @if $e != null { |
77 |
| - #{$e} { |
78 |
| - @extend %#{$category}; |
79 |
| - } |
80 |
| - } |
81 |
| - |
82 |
| - // Add class selector typographic styles. |
83 |
| - @if ($selector == '.igx-typography') { |
84 |
| - @include e(#{$category}) { |
85 |
| - @extend %#{$category}; |
86 |
| - } |
87 |
| - } |
88 |
| - } |
89 |
| - |
90 | 48 | // Call the individual component styles with the type scale
|
91 | 49 | @include _excel-filtering-typography($type-scale);
|
92 | 50 | @include igx-banner-typography($type-scale);
|
|
138 | 96 | // and all typographic elements.
|
139 | 97 | @include b(igx-typography) {
|
140 | 98 | @include _igx-typography-styles($font-family, $type-scale);
|
| 99 | + |
| 100 | + // Maps type scale typographic categories |
| 101 | + // to native elements. |
| 102 | + $category-element-map: ( |
| 103 | + h1: 'h1', |
| 104 | + h2: 'h2', |
| 105 | + h3: 'h3', |
| 106 | + h4: 'h4', |
| 107 | + h5: 'h5', |
| 108 | + h6: 'h6', |
| 109 | + body-1: 'p' |
| 110 | + ); |
| 111 | + |
| 112 | + @each $category, $type-style in $type-scale { |
| 113 | + // Get the native element that uses typographic styles directly |
| 114 | + // as mapped in the $category-element-map |
| 115 | + $e: map-get($category-element-map, $category); |
| 116 | + |
| 117 | + // Create a placeholder selector with styles for each |
| 118 | + // typographic style to be able to easily extend it |
| 119 | + // elsewhere. |
| 120 | + %#{$category} { |
| 121 | + @include igx-type-style($type-scale, $category); |
| 122 | + } |
| 123 | + |
| 124 | + // Add native element typographic styles. |
| 125 | + @if $e != null { |
| 126 | + // stylelint-disable-next-line max-nesting-depth |
| 127 | + #{$e} { |
| 128 | + @extend %#{$category}; |
| 129 | + } |
| 130 | + } |
| 131 | + |
| 132 | + // Add class selector typographic styles. |
| 133 | + @include e(#{$category}) { |
| 134 | + @extend %#{$category}; |
| 135 | + } |
| 136 | + } |
141 | 137 | }
|
142 | 138 | } @else {
|
143 | 139 | @include _igx-typography-styles($font-family, $type-scale);
|
|
0 commit comments