Skip to content

Commit 5229fe0

Browse files
andrewseguinAndrew Seguin
and
Andrew Seguin
authoredApr 5, 2025··
fix(multiple): rename hardcoded tokens that were renamed (#30807)
* fix(multiple): rename hardcoded tokens that were renamed * fix(multiple): fix density prefixes * fix(multiple): fix density prefixes --------- Co-authored-by: Andrew Seguin <[email protected]>
1 parent ac357fb commit 5229fe0

File tree

7 files changed

+30
-33
lines changed

7 files changed

+30
-33
lines changed
 

‎src/material/button-toggle/button-toggle.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $_standard-tokens: (
5858
border: solid 1px token-utils.slot(divider-color);
5959

6060
.mat-pseudo-checkbox {
61-
--mat-minimal-pseudo-checkbox-selected-checkmark-color: #{
61+
--mat-pseudo-checkbox-minimal-selected-checkmark-color: #{
6262
token-utils.slot(selected-state-text-color)};
6363
}
6464
}
@@ -94,7 +94,7 @@ $_standard-tokens: (
9494
font-weight: token-utils.slot(label-text-weight);
9595
letter-spacing: token-utils.slot(label-text-tracking);
9696

97-
--mat-minimal-pseudo-checkbox-selected-checkmark-color: #{
97+
--mat-pseudo-checkbox-minimal-selected-checkmark-color: #{
9898
token-utils.slot(selected-state-text-color)};
9999

100100
&.cdk-keyboard-focused .mat-button-toggle-focus-overlay {
@@ -167,7 +167,7 @@ $_standard-tokens: (
167167
@include token-utils.use-tokens($_legacy-tokens...) {
168168
color: token-utils.slot(disabled-state-text-color);
169169
background-color: token-utils.slot(disabled-state-background-color);
170-
--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #{
170+
--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: #{
171171
token-utils.slot(disabled-state-text-color)};
172172

173173
&.mat-button-toggle-checked {
@@ -216,7 +216,7 @@ $_standard-tokens: (
216216
background-color: token-utils.slot(disabled-state-background-color);
217217

218218
.mat-pseudo-checkbox {
219-
--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #{
219+
--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: #{
220220
token-utils.slot(disabled-selected-state-text-color)};
221221
}
222222

‎src/material/core/option/option.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $_side-padding: 16px;
5252
}
5353

5454
.mat-pseudo-checkbox {
55-
--mat-minimal-pseudo-checkbox-selected-checkmark-color: #{
55+
--mat-pseudo-checkbox-minimal-selected-checkmark-color: #{
5656
token-utils.slot(selected-state-label-text-color)};
5757
}
5858
}

‎src/material/core/tokens/_density.scss

+18-21
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,41 @@ $_density-tokens: (
2626
(mat, chip): (
2727
container-height: (32px, 28px, 24px),
2828
),
29-
(mat, circular-progress): (),
29+
(mat, progress-spinner): (),
3030
(mat, datepicker): (),
3131
(mat, dialog): (),
3232
(mat, divider): (),
33-
(mat, elevated-card): (),
33+
(mat, card-elevated): (),
3434
(mat, expansion): (
3535
header-collapsed-state-height: (48px, 44px, 40px, 36px),
3636
header-expanded-state-height: (64px, 60px, 56px, 48px),
3737
),
38-
(mat, extended-fab): (),
38+
(mat, fab-extended): (),
3939
(mat, fab): (
4040
touch-target-display: (block, block, none, none),
4141
),
4242
(mat, fab-small): (),
43-
(mat, filled-button): (
43+
(mat, button-filled): (
4444
touch-target-display: (block, block, none, none),
4545
container-height: (40px, 36px, 32px, 28px),
4646
),
47-
(mat, filled-text-field): (),
47+
(mat, form-field-filled): (),
4848
(mat, form-field): (
4949
container-height: (56px, 52px, 48px, 44px, 40px, 36px),
5050
filled-label-display: (block, block, none, none, none, none),
5151
container-vertical-padding: (16px, 14px, 12px, 10px, 8px, 6px),
5252
filled-with-label-container-padding-top: (24px, 22px, 12px, 10px, 8px, 6px),
5353
filled-with-label-container-padding-bottom: (8px, 6px, 12px, 10px, 8px, 6px),
5454
),
55-
(mat, full-pseudo-checkbox): (),
55+
(mat, pseudo-checkbox-full): (),
5656
(mat, grid-list): (),
5757
(mat, icon): (),
5858
(mat, icon-button): (
5959
touch-target-display: (block, block, none, none),
6060
// The size caps out at 24px, because anything lower will be smaller than the icon.
6161
state-layer-size: (40px, 36px, 32px, 28px, 24px, 24px),
6262
),
63-
(mat, linear-progress): (),
63+
(mat, progress-bar): (),
6464
(mat, list): (
6565
list-item-leading-icon-start-space: (16px, 12px, 8px, 4px),
6666
list-item-leading-icon-end-space: (16px, 12px, 8px, 4px),
@@ -69,23 +69,23 @@ $_density-tokens: (
6969
list-item-three-line-container-height: (88px, 84px, 80px, 76px, 72px, 56px),
7070
),
7171
(mat, menu): (),
72-
(mat, minimal-pseudo-checkbox): (),
72+
(mat, pseudo-checkbox-minimal): (),
7373
(mat, optgroup): (),
7474
(mat, option): (),
75-
(mat, outlined-button): (
75+
(mat, button-outlined): (
7676
container-height: (40px, 36px, 32px, 28px),
7777
touch-target-display: (block, block, none, none),
7878
),
79-
(mat, outlined-card): (),
80-
(mat, outlined-text-field): (),
79+
(mat, card-outlined): (),
80+
(mat, form-field-outlined): (),
8181
(mat, paginator): (
8282
container-size: (56px, 52px, 48px, 40px),
8383
form-field-container-height: (40px, 40px, 40px, 40px, 40px, 36px),
8484
form-field-container-vertical-padding: (8px, 8px, 8px, 8px, 8px, 6px),
8585
touch-target-display: (block, block, none, none),
8686
),
87-
(mat, plain-tooltip): (),
88-
(mat, protected-button): (
87+
(mat, tooltip): (),
88+
(mat, button-protected): (
8989
touch-target-display: (block, block, none, none),
9090
container-height: (40px, 36px, 32px, 28px),
9191
),
@@ -94,37 +94,34 @@ $_density-tokens: (
9494
state-layer-size: (40px, 36px, 32px, 28px),
9595
),
9696
(mat, ripple): (),
97-
(mat, secondary-navigation-tab): (
97+
(mat, tab): (
9898
container-height: (48px, 44px, 40px, 36px, 32px),
9999
),
100100
(mat, select): (
101101
arrow-transform: (translateY(-8px), translateY(-8px), none),
102102
),
103103
(mat, sidenav): (),
104-
(mat, slide-toggle): (),
105104
(mat, slider): (),
106105
(mat, snack-bar): (),
107106
(mat, sort): (),
108-
(mat, standard-button-toggle): (
107+
(mat, button-toggle): (
109108
height: (40px, 40px, 40px, 36px, 24px),
110109
),
111110
(mat, stepper): (
112111
header-height: (72px, 68px, 64px, 60px, 42px),
113112
),
114-
(mat, switch): (),
115-
(mat, tab-header): (),
116-
(mat, tab-indicator): (),
113+
(mat, slide-toggle): (),
117114
(mat, table): (
118115
header-container-height: (56px, 52px, 48px, 44px, 40px),
119116
footer-container-height: (52px, 48px, 44px, 40px, 36px),
120117
row-item-container-height: (52px, 48px, 44px, 40px, 36px),
121118
),
122-
(mat, text-button): (
119+
(mat, button-text): (
123120
touch-target-display: (block, block, none, none),
124121
container-height: (40px, 36px, 32px, 28px),
125122
),
126123
(mat, timepicker): (),
127-
(mat, tonal-button): (
124+
(mat, button-tonal): (
128125
container-height: (40px, 36px, 32px, 28px),
129126
touch-target-display: (block, block, none, none),
130127
),

‎src/material/datepicker/calendar.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $token-slots: m2-datepicker.get-token-slots();
5656
@include token-utils.use-tokens($token-prefix, $token-slots) {
5757
font-size: token-utils.slot(calendar-period-button-text-size);
5858
font-weight: token-utils.slot(calendar-period-button-text-weight);
59-
--mat-text-button-label-text-color: #{token-utils.slot(calendar-period-button-text-color)};
59+
--mat-button-text-label-text-color: #{token-utils.slot(calendar-period-button-text-color)};
6060
}
6161
}
6262

‎src/material/progress-spinner/progress-spinner.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ const BASE_STROKE_WIDTH = 10;
8484
'[class.mdc-circular-progress--indeterminate]': 'mode === "indeterminate"',
8585
'[style.width.px]': 'diameter',
8686
'[style.height.px]': 'diameter',
87-
'[style.--mat-circular-progress-size]': 'diameter + "px"',
88-
'[style.--mat-circular-progress-active-indicator-width]': 'diameter + "px"',
87+
'[style.--mat-progress-spinner-size]': 'diameter + "px"',
88+
'[style.--mat-progress-spinner-active-indicator-width]': 'diameter + "px"',
8989
'[attr.aria-valuemin]': '0',
9090
'[attr.aria-valuemax]': '100',
9191
'[attr.aria-valuenow]': 'mode === "determinate" ? value : null',

‎src/material/slide-toggle/_slide-toggle-theme.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
& {
5353
// TODO(andrewjs): Remove this once all tokens are migrated to
5454
// mat internally.
55-
--mdc-switch-disabled-label-text-color: #{inspection.get-theme-color(
55+
--mdc-slide-toggle-disabled-label-text-color: #{inspection.get-theme-color(
5656
$theme,
5757
foreground,
5858
disabled-text
5959
)};
6060
// TODO(wagnermaciel): Use our token system to define this css variable.
61-
--mat-switch-disabled-label-text-color: #{inspection.get-theme-color(
61+
--mat-slide-toggle-disabled-label-text-color: #{inspection.get-theme-color(
6262
$theme,
6363
foreground,
6464
disabled-text
@@ -67,7 +67,7 @@
6767

6868
.mat-mdc-slide-toggle {
6969
// TODO(wagnermaciel): Use our token system to define this css variable.
70-
--mat-switch-label-text-color: #{inspection.get-theme-color(
70+
--mat-slide-toggle-label-text-color: #{inspection.get-theme-color(
7171
$theme,
7272
foreground,
7373
text

‎src/material/slide-toggle/slide-toggle.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,6 @@ $token-slots: m2-slide-toggle.get-token-slots();
578578

579579
// TODO(wagnermaciel): Use our custom token system to emit this css rule.
580580
.mdc-switch--disabled + label {
581-
color: var(--mat-switch-disabled-label-text-color);
581+
color: var(--mat-slide-toggle-disabled-label-text-color);
582582
}
583583
}

0 commit comments

Comments
 (0)
Please sign in to comment.