Skip to content

Commit dd9300e

Browse files
authored
refactor(material/select): rename some tokens for more clarity (#27323)
Renames some of the `mat-select` tokens to make it clearer what they're referring to.
1 parent e7d9249 commit dd9300e

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/material/core/tokens/m2/mat/_select.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ $prefix: (mat, select);
2525

2626
@return (
2727
panel-background-color: theming.get-color-from-palette($background, card),
28-
enabled-trigger-color: rgba($on-surface, 0.87),
29-
disabled-trigger-color: rgba($on-surface, 0.38),
30-
placeholder-color: rgba($on-surface, 0.6),
28+
enabled-trigger-text-color: rgba($on-surface, 0.87),
29+
disabled-trigger-text-color: rgba($on-surface, 0.38),
30+
placeholder-text-color: rgba($on-surface, 0.6),
3131
enabled-arrow-color: rgba($on-surface, 0.54),
3232
disabled-arrow-color: rgba($on-surface, 0.38),
3333
focused-arrow-color: theming.get-color-from-palette($primary, default, 0.87),
@@ -46,12 +46,12 @@ $prefix: (mat, select);
4646
}
4747

4848
@return (
49-
trigger-font: typography-utils.font-family($config, body-1) or
49+
trigger-text-font: typography-utils.font-family($config, body-1) or
5050
typography-utils.font-family($config),
51-
trigger-line-height: typography-utils.line-height($config, body-1),
52-
trigger-size: typography-utils.font-size($config, body-1),
53-
trigger-tracking: typography-utils.letter-spacing($config, body-1),
54-
trigger-weight: typography-utils.font-weight($config, body-1)
51+
trigger-text-line-height: typography-utils.line-height($config, body-1),
52+
trigger-text-size: typography-utils.font-size($config, body-1),
53+
trigger-text-tracking: typography-utils.letter-spacing($config, body-1),
54+
trigger-text-weight: typography-utils.font-weight($config, body-1)
5555
);
5656
}
5757

src/material/select/select.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ $scale: 0.75 !default;
2424
@include token-utils.use-tokens(
2525
tokens-mat-select.$prefix, tokens-mat-select.get-token-slots()) {
2626
@include mdc-typography.smooth-font();
27-
@include token-utils.create-token-slot(color, enabled-trigger-color);
28-
@include token-utils.create-token-slot(font-family, trigger-font);
29-
@include token-utils.create-token-slot(line-height, trigger-line-height);
30-
@include token-utils.create-token-slot(font-size, trigger-size);
31-
@include token-utils.create-token-slot(font-weight, trigger-weight);
32-
@include token-utils.create-token-slot(letter-spacing, trigger-tracking);
27+
@include token-utils.create-token-slot(color, enabled-trigger-text-color);
28+
@include token-utils.create-token-slot(font-family, trigger-text-font);
29+
@include token-utils.create-token-slot(line-height, trigger-text-line-height);
30+
@include token-utils.create-token-slot(font-size, trigger-text-size);
31+
@include token-utils.create-token-slot(font-weight, trigger-text-weight);
32+
@include token-utils.create-token-slot(letter-spacing, trigger-text-tracking);
3333
}
3434
}
3535

3636
.mat-mdc-select-disabled {
3737
@include token-utils.use-tokens(
3838
tokens-mat-select.$prefix, tokens-mat-select.get-token-slots()) {
39-
@include token-utils.create-token-slot(color, disabled-trigger-color);
39+
@include token-utils.create-token-slot(color, disabled-trigger-text-color);
4040
}
4141
}
4242

@@ -171,7 +171,7 @@ div.mat-mdc-select-panel {
171171

172172
@include token-utils.use-tokens(
173173
tokens-mat-select.$prefix, tokens-mat-select.get-token-slots()) {
174-
@include token-utils.create-token-slot(color, placeholder-color);
174+
@include token-utils.create-token-slot(color, placeholder-text-color);
175175
}
176176

177177
._mat-animation-noopable & {

0 commit comments

Comments
 (0)