|
822 | 822 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
823 | 823 | /// @return {Map} A set of custom tokens for the mat-option
|
824 | 824 | @function option($systems, $exclude-hardcoded) {
|
825 |
| - @return (mat.private-merge-all( |
826 |
| - _generate-typography-tokens($systems, label-text, label-large), |
827 |
| - ( |
| 825 | + @return (( |
828 | 826 | selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
829 | 827 | label-text-color: map.get($systems, md-sys-color, on-surface),
|
830 | 828 | hover-state-layer-color: mat.private-safe-color-change(
|
|
836 | 834 | $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
837 | 835 | ),
|
838 | 836 | selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
|
839 |
| - ), |
| 837 | + |
| 838 | + // According to the spec the options have to be `label-large` in all typography |
| 839 | + // dimensions, however this is inconsistent with the designs and with MDC's |
| 840 | + // own implementation. This appears to be a bug in the spec, because MDC overrides |
| 841 | + // the font size and weight to be `body-large` (see b/261838263). We make the same |
| 842 | + // override here so the label looks correct. |
| 843 | + label-text-size: map.get($systems, md-sys-typescale, body-large-size), |
| 844 | + label-text-weight: map.get($systems, md-sys-typescale, body-large-weight), |
| 845 | + label-text-font: map.get($systems, md-sys-typescale, label-large-font), |
| 846 | + label-text-line-height: map.get($systems, md-sys-typescale, label-large-line-height), |
| 847 | + label-text-tracking: map.get($systems, md-sys-typescale, label-large-tracking), |
840 | 848 | ), (
|
841 | 849 | // Color variants:
|
842 | 850 | primary: (
|
|
0 commit comments