diff --git a/badge/lib/_badge.scss b/badge/lib/_badge.scss index 1e8fc42633..28067dd465 100644 --- a/badge/lib/_badge.scss +++ b/badge/lib/_badge.scss @@ -8,24 +8,20 @@ // go/keep-sorted start @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; // go/keep-sorted end $_custom-property-prefix: 'badge'; @mixin theme($tokens) { - $tokens: theme.validate-theme( - _resolve-tokens(tokens.md-comp-badge-values()), - _resolve-tokens($tokens) - ); + $tokens: theme.validate-theme(tokens.md-comp-badge-values(), $tokens); $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix); @include theme.emit-theme-vars($tokens); } @mixin styles() { - $tokens: _resolve-tokens(tokens.md-comp-badge-values()); + $tokens: tokens.md-comp-badge-values(); $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix); :host { @@ -71,7 +67,3 @@ $_custom-property-prefix: 'badge'; font: var(--_large-label-text-type); } } - -@function _resolve-tokens($tokens) { - @return typography.resolve-tokens($tokens, 'large-label-text'); -} diff --git a/button/lib/_elevated-button.scss b/button/lib/_elevated-button.scss index c8c8457eef..16e1e4eb26 100644 --- a/button/lib/_elevated-button.scss +++ b/button/lib/_elevated-button.scss @@ -9,7 +9,6 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -52,6 +51,5 @@ $_custom-property-prefix: 'elevated-button'; @function _resolve-tokens($tokens) { $tokens: shared.flatten-disabled-colors($tokens); $tokens: shared.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/button/lib/_filled-button.scss b/button/lib/_filled-button.scss index 8f6e923297..9ff325f36c 100644 --- a/button/lib/_filled-button.scss +++ b/button/lib/_filled-button.scss @@ -9,7 +9,6 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -51,6 +50,5 @@ $_custom-property-prefix: 'filled-button'; @function _resolve-tokens($tokens) { $tokens: shared.flatten-disabled-colors($tokens); $tokens: shared.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/button/lib/_outlined-button.scss b/button/lib/_outlined-button.scss index 825f73112e..ac025b236f 100644 --- a/button/lib/_outlined-button.scss +++ b/button/lib/_outlined-button.scss @@ -9,7 +9,6 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -86,6 +85,5 @@ $_custom-property-prefix: 'outlined-button'; @function _resolve-tokens($tokens) { $tokens: shared.flatten-disabled-colors($tokens); $tokens: shared.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/button/lib/_text-button.scss b/button/lib/_text-button.scss index 634632aeae..26aec46225 100644 --- a/button/lib/_text-button.scss +++ b/button/lib/_text-button.scss @@ -9,7 +9,6 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -59,6 +58,5 @@ $_custom-property-prefix: 'text-button'; ); $tokens: shared.flatten-disabled-colors($tokens); $tokens: shared.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/button/lib/_tonal-button.scss b/button/lib/_tonal-button.scss index 1ee458708d..47ec4117ae 100644 --- a/button/lib/_tonal-button.scss +++ b/button/lib/_tonal-button.scss @@ -9,7 +9,6 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -51,6 +50,5 @@ $_custom-property-prefix: 'tonal-button'; @function _resolve-tokens($tokens) { $tokens: shared.flatten-disabled-colors($tokens); $tokens: shared.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/chips/lib/_shared.scss b/chips/lib/_shared.scss index c06269cf1f..db833463a1 100644 --- a/chips/lib/_shared.scss +++ b/chips/lib/_shared.scss @@ -11,7 +11,6 @@ @use '../../focus/focus-ring'; @use '../../ripple/ripple'; @use '../../sass/shape'; -@use '../../sass/typography'; // go/keep-sorted end @mixin styles() { @@ -107,6 +106,5 @@ 'dragged-state-layer-color', 'dragged-state-layer-opacity' ); - $tokens: typography.resolve-tokens($tokens, 'label-text'); @return $tokens; } diff --git a/dialog/lib/_tokens.scss b/dialog/lib/_tokens.scss index b7b3dcfeff..488a6098cb 100644 --- a/dialog/lib/_tokens.scss +++ b/dialog/lib/_tokens.scss @@ -12,7 +12,6 @@ @use '../../sass/shape'; @use '../../sass/string-ext'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../sass/var'; @use '../../tokens'; // go/keep-sorted end @@ -75,7 +74,7 @@ $_fullscreen-tokens: ( $remove-prefix: 'action-'; $tokens: _map-without-keys-with-prefix($tokens, $remove-prefix); - @return typography.resolve-tokens($tokens, 'headline', 'supporting-text'); + @return $tokens; } /** diff --git a/fab/lib/_fab-extended.scss b/fab/lib/_fab-extended.scss index 73dc0c8689..b7063c3177 100644 --- a/fab/lib/_fab-extended.scss +++ b/fab/lib/_fab-extended.scss @@ -12,15 +12,14 @@ // go/keep-sorted start @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @mixin theme($tokens) { $tokens: theme.validate-theme( - _resolve-typography(tokens.md-comp-extended-fab-surface-values()), - _resolve-typography($tokens) + tokens.md-comp-extended-fab-surface-values(), + $tokens ); $tokens: theme.create-theme-vars($tokens, 'fab-extended'); $tokens: shape.resolve-tokens($tokens, 'container-shape'); @@ -29,7 +28,7 @@ } @mixin styles() { - $tokens: _resolve-typography(tokens.md-comp-extended-fab-surface-values()); + $tokens: tokens.md-comp-extended-fab-surface-values(); $tokens: theme.create-theme-vars($tokens, 'fab-extended'); $tokens: shape.resolve-tokens($tokens, 'container-shape'); @@ -72,7 +71,3 @@ } } } - -@function _resolve-typography($tokens) { - @return typography.resolve-tokens($tokens, 'label-text'); -} diff --git a/list/lib/listitem/_list-item.scss b/list/lib/listitem/_list-item.scss index 02f4c63ff3..206164da48 100644 --- a/list/lib/listitem/_list-item.scss +++ b/list/lib/listitem/_list-item.scss @@ -13,7 +13,6 @@ @use '../../../ripple/ripple'; @use '../../../sass/map-ext'; @use '../../../sass/theme'; -@use '../../../sass/typography'; @use '../../../tokens'; // go/keep-sorted end @@ -453,16 +452,6 @@ } } - // Do not include list-item-trailing-supporting-text or list-item-label-text - // because we actually need the line-height tokens separately from the - // *-type tokens. - $list-item-tokens: typography.resolve-tokens( - $list-item-tokens, - 'list-item-supporting-text', - 'list-item-leading-avatar-label', - 'list-item-overline' - ); - $list-item-tokens: _remove-unused-tokens($list-item-tokens); @return $list-item-tokens; @@ -484,15 +473,7 @@ 'list-item-overline-type', 'list-item-selected-trailing-icon', 'list-item-selected-trailing-icon-color', - 'list-item-unselected-trailing-icon-color', - 'list-item-label-text-font', - 'list-item-label-text-size', - 'list-item-label-text-tracking', - 'list-item-label-text-weight', - 'list-item-trailing-supporting-text-font', - 'list-item-trailing-supporting-text-size', - 'list-item-trailing-supporting-text-tracking', - 'list-item-trailing-supporting-text-weight' + 'list-item-unselected-trailing-icon-color' ); @each $token in $unused-tokens { diff --git a/navigationtab/lib/_navigation-tab.scss b/navigationtab/lib/_navigation-tab.scss index e2003c341f..e1471a458a 100644 --- a/navigationtab/lib/_navigation-tab.scss +++ b/navigationtab/lib/_navigation-tab.scss @@ -15,7 +15,6 @@ @use '../../motion/animation'; @use '../../ripple/ripple'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; // go/keep-sorted end @@ -24,8 +23,8 @@ $_custom-property-prefix: 'navigation-bar'; @mixin theme($tokens) { $tokens: theme.validate-theme( - _resolve-tokens(tokens.md-comp-navigation-bar-values()), - _resolve-tokens($tokens) + tokens.md-comp-navigation-bar-values(), + $tokens ); $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix); @@ -34,7 +33,7 @@ $_custom-property-prefix: 'navigation-bar'; } @mixin styles() { - $tokens: _resolve-tokens(tokens.md-comp-navigation-bar-values()); + $tokens: tokens.md-comp-navigation-bar-values(); $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix); :host { @@ -260,7 +259,3 @@ $_custom-property-prefix: 'navigation-bar'; ); } } - -@function _resolve-tokens($tokens) { - @return typography.resolve-tokens($tokens, 'label-text'); -} diff --git a/sass/_typography.scss b/sass/_typography.scss deleted file mode 100644 index 04b37c906f..0000000000 --- a/sass/_typography.scss +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2021 Google LLC -// SPDX-License-Identifier: Apache-2.0 -// - -// go/keep-sorted start -@use 'sass:map'; -// go/keep-sorted end - -/// Resolves a theme's typography tokens for the given prefixes -/// -/// @example - scss -/// // $theme has the following tokens: -/// // - label-text-font -/// // - label-text-line-height -/// // - label-text-size -/// // - label-text-tracking -/// // - label-text-weight -/// // - label-text-type -/// @debug resolve-tokens($theme, label-text); // (label-text-type: ...) -/// -/// @param {Map} $tokens - Tokens to resolve -/// @param {String...} $token-prefixes - The prefixes of typography tokens to resolve. -/// @return {Map} The resolved tokens -@function resolve-tokens($tokens, $token-prefixes...) { - @each $token-prefix in $token-prefixes { - // leave only `#{$token-prefix}-type` - $tokens: map.remove( - $tokens, - '#{$token-prefix}-font', - '#{$token-prefix}-line-height', - '#{$token-prefix}-size', - '#{$token-prefix}-tracking', - '#{$token-prefix}-weight' - ); - } - - @return $tokens; -} diff --git a/sass/test/_typography.test.scss b/sass/test/_typography.test.scss deleted file mode 100644 index 10bfb4fc9b..0000000000 --- a/sass/test/_typography.test.scss +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2023 Google LLC -// SPDX-License-Identifier: Apache-2.0 -// - -// go/keep-sorted start -@use 'sass:map'; -@use 'sass:meta'; -@use 'true' as test; -// go/keep-sorted end -// go/keep-sorted start -@use '../map-ext'; -@use '../typography'; -// go/keep-sorted end - -@include test.describe('typography') { - $input: ( - 'text-font': 'Roboto', - 'text-line-height': 1rem, - 'text-size': 1rem, - 'text-tracking': 0.005rem, - 'text-weight': 400, - 'text-type': '400 1rem/1rem Roboto', - ); - - @include test.describe('resolve-tokens()') { - @include test.it('should return a map') { - $result: typography.resolve-tokens($input); - @include test.assert-equal(meta.type-of($result), 'map'); - } - - @include test.it('does not modify input without a list of tokens') { - $expected: $input; - $result: typography.resolve-tokens($input); - @include test.assert-equal($expected, $result); - } - - @include test.it('should remove typography tokens aside from `-type`') { - $expected: map-ext.pick($input, ('text-type')); - $result: typography.resolve-tokens($input, 'text'); - @include test.assert-equal($expected, $result); - } - - @include test.it('only modifies specified tokens') { - $input: map.merge( - $input, - ( - 'other-token': 16px, - ) - ); - $expected: map-ext.pick($input, ('text-type', 'other-token')); - $result: typography.resolve-tokens($input, 'text'); - @include test.assert-equal($expected, $result); - } - } -} diff --git a/sass/test/test.scss b/sass/test/test.scss index 7377e90956..0001a2ba23 100644 --- a/sass/test/test.scss +++ b/sass/test/test.scss @@ -9,5 +9,4 @@ @use './map-ext.test'; @use './shape.test'; @use './string-ext.test'; -@use './typography.test'; // go/keep-sorted end diff --git a/segmentedbutton/lib/_shared.scss b/segmentedbutton/lib/_shared.scss index bca53e3e5d..202c88e0f7 100644 --- a/segmentedbutton/lib/_shared.scss +++ b/segmentedbutton/lib/_shared.scss @@ -14,7 +14,6 @@ @use '../../ripple/ripple'; @use '../../sass/color'; @use '../../sass/touch-target'; -@use '../../sass/typography'; // go/keep-sorted end @mixin styles() { @@ -357,7 +356,6 @@ } @function resolve-tokens($tokens) { - $tokens: typography.resolve-tokens($tokens, 'label-text'); $tokens: _flatten-disabled-colors($tokens); @return $tokens; } diff --git a/slider/lib/_slider.scss b/slider/lib/_slider.scss index 5ac242927a..ce3b0c68f8 100644 --- a/slider/lib/_slider.scss +++ b/slider/lib/_slider.scss @@ -15,14 +15,12 @@ @use '../../sass/color'; @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../sass/var'; @use './tokens'; // go/keep-sorted end @mixin theme($tokens) { $tokens: tokens.remove-unsupported-tokens($tokens); - $tokens: typography.resolve-tokens($tokens, 'label-label-text'); $tokens: theme.validate-theme(tokens.md-comp-slider-values(), $tokens); $tokens: theme.create-theme-vars($tokens, 'slider'); diff --git a/slider/lib/_tokens.scss b/slider/lib/_tokens.scss index 989011a5c6..af959fca0f 100644 --- a/slider/lib/_tokens.scss +++ b/slider/lib/_tokens.scss @@ -11,7 +11,6 @@ @use '../../sass/color'; @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../sass/var'; @use '../../tokens'; // go/keep-sorted end @@ -29,10 +28,6 @@ $_tokens: ( map.get(tokens.md-sys-motion-values(), 'easing-emphasized'), ); -@function resolve-typography($tokens) { - @return typography.resolve-tokens($tokens, 'label-label-text'); -} - @function remove-unsupported-tokens($tokens) { $unsupported-tokens: ( 'disabled-handle-opacity', @@ -52,12 +47,11 @@ $_tokens: ( } /** - * - * Extended token set for slider. + * + * Extended token set for slider. */ @function md-comp-slider-values() { $tokens: remove-unsupported-tokens($baseTokens); - $tokens: typography.resolve-tokens($tokens, 'label-label-text'); @return map.merge($tokens, $_tokens); } diff --git a/textfield/lib/_filled-text-field.scss b/textfield/lib/_filled-text-field.scss index 94ce1fbbac..8d2c99a8bf 100644 --- a/textfield/lib/_filled-text-field.scss +++ b/textfield/lib/_filled-text-field.scss @@ -10,7 +10,6 @@ @use '../../field/filled-field'; @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -146,10 +145,5 @@ ); } - @return typography.resolve-tokens( - $tokens, - 'input-text', - 'label-text', - 'supporting-text' - ); + @return $tokens; } diff --git a/textfield/lib/_outlined-text-field.scss b/textfield/lib/_outlined-text-field.scss index 4647e1da00..1e87c71791 100644 --- a/textfield/lib/_outlined-text-field.scss +++ b/textfield/lib/_outlined-text-field.scss @@ -10,7 +10,6 @@ @use '../../field/outlined-field'; @use '../../sass/shape'; @use '../../sass/theme'; -@use '../../sass/typography'; @use '../../tokens'; @use './shared'; // go/keep-sorted end @@ -133,10 +132,5 @@ ); } - @return typography.resolve-tokens( - $tokens, - 'input-text', - 'label-text', - 'supporting-text' - ); + @return $tokens; } diff --git a/tokens/_md-comp-assist-chip.scss b/tokens/_md-comp-assist-chip.scss index f6a564e42b..1d361ea107 100644 --- a/tokens/_md-comp-assist-chip.scss +++ b/tokens/_md-comp-assist-chip.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-assist-chip.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-assist-chip.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-badge.scss b/tokens/_md-comp-badge.scss index ec582f5a2c..70f4411317 100644 --- a/tokens/_md-comp-badge.scss +++ b/tokens/_md-comp-badge.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-shape'; @@ -16,6 +19,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'large-label-text-font', + 'large-label-text-line-height', + 'large-label-text-size', + 'large-label-text-tracking', + 'large-label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-badge.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-badge.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-dialog.scss b/tokens/_md-comp-dialog.scss index 8cdbd4ea5a..f5876b5072 100644 --- a/tokens/_md-comp-dialog.scss +++ b/tokens/_md-comp-dialog.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,21 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'headline-font', + 'headline-line-height', + 'headline-size', + 'headline-tracking', + 'headline-weight', + 'supporting-text-font', + 'supporting-text-line-height', + 'supporting-text-size', + 'supporting-text-tracking', + 'supporting-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-dialog.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-dialog.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-elevated-button.scss b/tokens/_md-comp-elevated-button.scss index 37a96e2cab..967ba68172 100644 --- a/tokens/_md-comp-elevated-button.scss +++ b/tokens/_md-comp-elevated-button.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-elevated-button.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-elevated-button.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-extended-fab-branded.scss b/tokens/_md-comp-extended-fab-branded.scss index b4378409c0..5c259352bb 100644 --- a/tokens/_md-comp-extended-fab-branded.scss +++ b/tokens/_md-comp-extended-fab-branded.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { @return md-comp-extended-fab-branded.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-extended-fab-primary.scss b/tokens/_md-comp-extended-fab-primary.scss index 3b3ad118f5..1287cd97d7 100644 --- a/tokens/_md-comp-extended-fab-primary.scss +++ b/tokens/_md-comp-extended-fab-primary.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { @return md-comp-extended-fab-primary.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-extended-fab-secondary.scss b/tokens/_md-comp-extended-fab-secondary.scss index 68fabb5251..765fdba175 100644 --- a/tokens/_md-comp-extended-fab-secondary.scss +++ b/tokens/_md-comp-extended-fab-secondary.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,9 +23,19 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { @return md-comp-extended-fab-secondary.values( $deps, $exclude-hardcoded-values ); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-extended-fab-surface.scss b/tokens/_md-comp-extended-fab-surface.scss index 9ff5dc1ff7..838b55896c 100644 --- a/tokens/_md-comp-extended-fab-surface.scss +++ b/tokens/_md-comp-extended-fab-surface.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { @return md-comp-extended-fab-surface.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-extended-fab-tertiary.scss b/tokens/_md-comp-extended-fab-tertiary.scss index 6955512cef..a5c63ff0c3 100644 --- a/tokens/_md-comp-extended-fab-tertiary.scss +++ b/tokens/_md-comp-extended-fab-tertiary.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,9 +23,19 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-extended-fab-tertiary.values( + $tokens: md-comp-extended-fab-tertiary.values( $deps, $exclude-hardcoded-values ); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-filled-button.scss b/tokens/_md-comp-filled-button.scss index 0406af1b37..72575d3ab6 100644 --- a/tokens/_md-comp-filled-button.scss +++ b/tokens/_md-comp-filled-button.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-filled-button.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-filled-button.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-filled-text-field.scss b/tokens/_md-comp-filled-text-field.scss index ecf0cc1b75..a812a10e5f 100644 --- a/tokens/_md-comp-filled-text-field.scss +++ b/tokens/_md-comp-filled-text-field.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-shape'; @@ -18,6 +21,26 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'input-text-font', + 'input-text-line-height', + 'input-text-size', + 'input-text-tracking', + 'input-text-weight', + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight', + 'supporting-text-font', + 'supporting-text-line-height', + 'supporting-text-size', + 'supporting-text-tracking', + 'supporting-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-filled-text-field.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-filled-text-field.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-filled-tonal-button.scss b/tokens/_md-comp-filled-tonal-button.scss index f06f1996d5..fb95a7907c 100644 --- a/tokens/_md-comp-filled-tonal-button.scss +++ b/tokens/_md-comp-filled-tonal-button.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-filled-tonal-button.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-filled-tonal-button.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-filter-chip.scss b/tokens/_md-comp-filter-chip.scss index 72f59dc536..25f4650316 100644 --- a/tokens/_md-comp-filter-chip.scss +++ b/tokens/_md-comp-filter-chip.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-filter-chip.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-filter-chip.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-input-chip.scss b/tokens/_md-comp-input-chip.scss index 49f5aa2dce..ac0fc4718b 100644 --- a/tokens/_md-comp-input-chip.scss +++ b/tokens/_md-comp-input-chip.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-input-chip.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-input-chip.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-list.scss b/tokens/_md-comp-list.scss index 55d13ac551..c179621f31 100644 --- a/tokens/_md-comp-list.scss +++ b/tokens/_md-comp-list.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,36 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + // Do not remove label-text-line-height since it is needed + 'list-item-label-text-font', + 'list-item-label-text-size', + 'list-item-label-text-tracking', + 'list-item-label-text-weight', + 'list-item-leading-avatar-label-font', + 'list-item-leading-avatar-label-line-height', + 'list-item-leading-avatar-label-size', + 'list-item-leading-avatar-label-tracking', + 'list-item-leading-avatar-label-weight', + 'list-item-supporting-text-font', + 'list-item-supporting-text-line-height', + 'list-item-supporting-text-size', + 'list-item-supporting-text-tracking', + 'list-item-supporting-text-weight', + 'list-item-overline-font', + 'list-item-overline-line-height', + 'list-item-overline-size', + 'list-item-overline-tracking', + 'list-item-overline-weight', + // Do not remove trailing-supporting-text-line-height since it is needed + 'list-item-trailing-supporting-text-font', + 'list-item-trailing-supporting-text-size', + 'list-item-trailing-supporting-text-tracking', + 'list-item-trailing-supporting-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-list.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-list.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-outlined-segmented-button.scss b/tokens/_md-comp-outlined-segmented-button.scss index 87f7e53a0f..2979a13e24 100644 --- a/tokens/_md-comp-outlined-segmented-button.scss +++ b/tokens/_md-comp-outlined-segmented-button.scss @@ -1,8 +1,10 @@ // // Copyright 2023 Google LLC -// SPDX-License-Identifier: Apache-2.0 -// +// SPDX-License-Ide +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-shape'; @@ -18,9 +20,19 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-outlined-segmented-button.values( + $tokens: md-comp-outlined-segmented-button.values( $deps, $exclude-hardcoded-values ); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-outlined-text-field.scss b/tokens/_md-comp-outlined-text-field.scss index 31e7d15189..4bfc84d2b0 100644 --- a/tokens/_md-comp-outlined-text-field.scss +++ b/tokens/_md-comp-outlined-text-field.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-shape'; @@ -16,6 +19,26 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'input-text-font', + 'input-text-line-height', + 'input-text-size', + 'input-text-tracking', + 'input-text-weight', + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight', + 'supporting-text-font', + 'supporting-text-line-height', + 'supporting-text-size', + 'supporting-text-tracking', + 'supporting-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-outlined-text-field.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-outlined-text-field.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-primary-navigation-tab.scss b/tokens/_md-comp-primary-navigation-tab.scss index 3ecd522438..c004519827 100644 --- a/tokens/_md-comp-primary-navigation-tab.scss +++ b/tokens/_md-comp-primary-navigation-tab.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,9 +23,19 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'with-label-text-label-text-font', + 'with-label-text-label-text-line-height', + 'with-label-text-label-text-size', + 'with-label-text-label-text-tracking', + 'with-label-text-label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-primary-navigation-tab.values( + $tokens: md-comp-primary-navigation-tab.values( $deps, $exclude-hardcoded-values ); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-secondary-navigation-tab.scss b/tokens/_md-comp-secondary-navigation-tab.scss index dcb12740e3..9091061440 100644 --- a/tokens/_md-comp-secondary-navigation-tab.scss +++ b/tokens/_md-comp-secondary-navigation-tab.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,9 +23,19 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-secondary-navigation-tab.values( + $tokens: md-comp-secondary-navigation-tab.values( $deps, $exclude-hardcoded-values ); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-slider.scss b/tokens/_md-comp-slider.scss index 94cc58cb8e..fd2ed27ec2 100644 --- a/tokens/_md-comp-slider.scss +++ b/tokens/_md-comp-slider.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-label-text-font', + 'label-label-text-line-height', + 'label-label-text-size', + 'label-label-text-tracking', + 'label-label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-slider.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-slider.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; } diff --git a/tokens/_md-comp-suggestion-chip.scss b/tokens/_md-comp-suggestion-chip.scss index 7a4fbc3989..6f757e0010 100644 --- a/tokens/_md-comp-suggestion-chip.scss +++ b/tokens/_md-comp-suggestion-chip.scss @@ -3,6 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // +// go/keep-sorted start +@use 'sass:map'; +// go/keep-sorted end // go/keep-sorted start @use './md-sys-color'; @use './md-sys-elevation'; @@ -20,6 +23,16 @@ $_default: ( 'md-sys-typescale': md-sys-typescale.values(), ); +$_unsupported-tokens: ( + 'label-text-font', + 'label-text-line-height', + 'label-text-size', + 'label-text-tracking', + 'label-text-weight' +); + @function values($deps: $_default, $exclude-hardcoded-values: false) { - @return md-comp-suggestion-chip.values($deps, $exclude-hardcoded-values); + $tokens: md-comp-suggestion-chip.values($deps, $exclude-hardcoded-values); + $tokens: map.remove($tokens, $_unsupported-tokens...); + @return $tokens; }