|
70 | 70 | small-size-container-size: _hardcode(6px, $exclude-hardcoded), |
71 | 71 | container-padding: _hardcode(0 4px, $exclude-hardcoded), |
72 | 72 | small-size-container-padding: _hardcode(0, $exclude-hardcoded), |
73 | | - container-offset: -12px 0, |
74 | | - small-size-container-offset: -6px 0, |
75 | | - container-overlap-offset: -12px, |
76 | | - small-size-container-overlap-offset: -6px, |
| 73 | + container-offset: _hardcode(-12px 0, $exclude-hardcoded), |
| 74 | + small-size-container-offset: _hardcode(-6px 0, $exclude-hardcoded), |
| 75 | + container-overlap-offset: _hardcode(-12px, $exclude-hardcoded), |
| 76 | + small-size-container-overlap-offset: _hardcode(-6px, $exclude-hardcoded), |
77 | 77 |
|
78 | 78 | // This size isn't in the M3 spec so we emit the same values as for `medium`. |
79 | 79 | large-size-container-size: _hardcode(16px, $exclude-hardcoded), |
80 | | - large-size-container-offset: -12px 0, |
81 | | - large-size-container-overlap-offset: -12px, |
| 80 | + large-size-container-offset: _hardcode(-12px 0, $exclude-hardcoded), |
| 81 | + large-size-container-overlap-offset: _hardcode(-12px, $exclude-hardcoded), |
82 | 82 | large-size-text-size: map.get($systems, md-sys-typescale, label-small-size), |
83 | 83 | large-size-container-padding: _hardcode(0 4px, $exclude-hardcoded), |
84 | 84 | legacy-large-size-container-size: _hardcode(unset, $exclude-hardcoded), |
|
423 | 423 | @return ( |
424 | 424 | container-max-width: _hardcode(560px, $exclude-hardcoded), |
425 | 425 | container-small-max-width: _hardcode(calc(100vw - 32px), $exclude-hardcoded), |
426 | | - container-min-width: _harcode(280px, $exclude-hardcoded), |
| 426 | + container-min-width: _hardcode(280px, $exclude-hardcoded), |
427 | 427 | actions-alignment: _hardcode(flex-end, $exclude-hardcoded), |
428 | 428 | content-padding: _hardcode(20px 24px, $exclude-hardcoded), |
429 | 429 | with-actions-content-padding: _hardcode(20px 24px 0, $exclude-hardcoded), |
|
1169 | 1169 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
1170 | 1170 | /// @return {Map} A set of custom tokens for the mat-slide-toggle |
1171 | 1171 | @function switch($systems, $exclude-hardcoded) { |
1172 | | - @return (( |
1173 | | - unselected-handle-size: 16px, |
1174 | | - selected-handle-size: 24px, |
1175 | | - with-icon-handle-size: 24px, |
1176 | | - pressed-handle-size: 28px, |
1177 | | - selected-handle-horizontal-margin: 0 24px, |
1178 | | - selected-with-icon-handle-horizontal-margin: 0 24px, |
1179 | | - selected-pressed-handle-horizontal-margin: 0 22px, |
1180 | | - unselected-handle-horizontal-margin: 0 8px, |
1181 | | - unselected-with-icon-handle-horizontal-margin: 0 4px, |
1182 | | - unselected-pressed-handle-horizontal-margin: 0 2px, |
| 1172 | + @return ( |
| 1173 | + unselected-handle-size: _hardcode(16px, $exclude-hardcoded), |
| 1174 | + selected-handle-size: _hardcode(24px, $exclude-hardcoded), |
| 1175 | + with-icon-handle-size: _hardcode(24px, $exclude-hardcoded), |
| 1176 | + pressed-handle-size: _hardcode(28px, $exclude-hardcoded), |
| 1177 | + selected-handle-horizontal-margin: _hardcode(0 24px, $exclude-hardcoded), |
| 1178 | + selected-with-icon-handle-horizontal-margin: _hardcode(0 24px, $exclude-hardcoded), |
| 1179 | + selected-pressed-handle-horizontal-margin: _hardcode(0 22px, $exclude-hardcoded), |
| 1180 | + unselected-handle-horizontal-margin: _hardcode(0 8px, $exclude-hardcoded), |
| 1181 | + unselected-with-icon-handle-horizontal-margin: _hardcode(0 4px, $exclude-hardcoded), |
| 1182 | + unselected-pressed-handle-horizontal-margin: _hardcode(0 2px, $exclude-hardcoded), |
1183 | 1183 | // The hidden and visible track represent whichever track is visible or |
1184 | 1184 | // hidden in the ui. This could be the .mdc-switch__track :before or |
1185 | 1185 | // :after depending on whether the switch is selected or unselected. |
1186 | 1186 | // |
1187 | 1187 | // The m2 slide-toggle uses transforms to hide & show the tracks while |
1188 | 1188 | // the m3 slide-toggle uses opacity. |
1189 | | - visible-track-opacity: 1, |
1190 | | - hidden-track-opacity: 0, |
1191 | | - visible-track-transition: opacity 75ms, |
1192 | | - hidden-track-transition: opacity 75ms, |
1193 | | - ), ()); |
| 1189 | + visible-track-opacity: _hardcode(1, $exclude-hardcoded), |
| 1190 | + hidden-track-opacity: _hardcode(0, $exclude-hardcoded), |
| 1191 | + visible-track-transition: _hardcode(opacity 75ms, $exclude-hardcoded), |
| 1192 | + hidden-track-transition: _hardcode(opacity 75ms, $exclude-hardcoded), |
| 1193 | + ); |
1194 | 1194 | } |
1195 | 1195 |
|
1196 | 1196 | /// Generates custom tokens for the mat-snack-bar. |
|
1291 | 1291 | _generate-typography-tokens($systems, label-text, title-small), |
1292 | 1292 | ( |
1293 | 1293 | divider-color: map.get($systems, md-sys-color, surface-variant), |
1294 | | - divider-height: 1px, |
| 1294 | + divider-height: _hardcode(1px, $exclude-hardcoded), |
1295 | 1295 | disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value. |
1296 | 1296 | pagination-icon-color: map.get($systems, md-sys-color, on-surface), |
1297 | 1297 | inactive-label-text-color: map.get($systems, md-sys-color, on-surface), |
|
0 commit comments