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