Skip to content

Commit 9bf4be9

Browse files
authored
fix(multiple): rename token prefixes to match components (#30802)
* fix(multiple): rename token prefixes to match components * fix(material/core): theming tests
1 parent 3a1a0b3 commit 9bf4be9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+46
-46
lines changed

src/material/button-toggle/_m2-legacy-button-toggle.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, legacy-button-toggle);
6+
$prefix: (mat, button-toggle-legacy);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/button-toggle/_m2-standard-button-toggle.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use '../core/style/sass-utils';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, standard-button-toggle);
9+
$prefix: (mat, button-toggle);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

src/material/button-toggle/_m3-standard-button-toggle.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, standard-button-toggle);
6+
$prefix: (mat, button-toggle);
77

88
/// Generates custom tokens for the mat-button-toggle.
99
/// @param {Map} $systems The MDC system tokens

src/material/button/_m2-extended-fab.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@use '../core/theming/inspection';
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
7-
$prefix: (mat, extended-fab);
7+
$prefix: (mat, fab-extended);
88

99
@function get-unthemable-tokens() {
1010
@return (

src/material/button/_m2-filled-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use '../core/style/sass-utils';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, filled-button);
9+
$prefix: (mat, button-filled);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

src/material/button/_m2-outlined-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use 'sass:map';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, outlined-button);
9+
$prefix: (mat, button-outlined);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

src/material/button/_m2-protected-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@use '../core/style/elevation';
88

99
// The prefix used to generate the fully qualified name for tokens in this file.
10-
$prefix: (mat, protected-button);
10+
$prefix: (mat, button-protected);
1111

1212
// Tokens that can't be configured through Angular Material's current theming API,
1313
// but may be in a future version of the theming API.

src/material/button/_m2-text-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use '../core/style/sass-utils';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, text-button);
9+
$prefix: (mat, button-text);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

src/material/button/_m2-tonal-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@use '../core/style/sass-utils';
66

77
// The prefix used to generate the fully qualified name for tokens in this file.
8-
$prefix: (mat, tonal-button);
8+
$prefix: (mat, button-tonal);
99

1010
// Tokens that can't be configured through Angular Material's current theming API,
1111
// but may be in a future version of the theming API.

src/material/button/_m3-extended-fab.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, extended-fab);
6+
$prefix: (mat, fab-extended);
77

88
/// Generates the tokens for MDC extended-fab
99
/// @param {Map} $systems The MDC system tokens

src/material/button/_m3-filled-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, filled-button);
6+
$prefix: (mat, button-filled);
77

88
/// Generates custom tokens for the mat-flat-button.
99
/// @param {Map} $systems The MDC system tokens

src/material/button/_m3-outlined-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, outlined-button);
6+
$prefix: (mat, button-outlined);
77

88
/// Generates custom tokens for the mat-outlined-button.
99
/// @param {Map} $systems The MDC system tokens

src/material/button/_m3-protected-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
77
// Note: in M3 the "protected" button is called "elevated".
8-
$prefix: (mat, protected-button);
8+
$prefix: (mat, button-protected);
99

1010
/// Generates custom tokens for the mat-raised-button.
1111
/// @param {Map} $systems The MDC system tokens

src/material/button/_m3-text-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, text-button);
6+
$prefix: (mat, button-text);
77

88
/// Generates custom tokens for the mat-button.
99
/// @param {Map} $systems The MDC system tokens

src/material/button/_m3-tonal-button.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, tonal-button);
6+
$prefix: (mat, button-tonal);
77

88
/// Generates custom tokens for the mat-flat-button.
99
/// @param {Map} $systems The MDC system tokens

src/material/card/_m2-elevated-card.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@use '../core/tokens/m2-utils';
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
7-
$prefix: (mat, elevated-card);
7+
$prefix: (mat, card-elevated);
88

99
// Tokens that can't be configured through Angular Material's current theming API,
1010
// but may be in a future version of the theming API.

src/material/card/_m2-outlined-card.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@use '../core/tokens/m2-utils';
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
7-
$prefix: (mat, outlined-card);
7+
$prefix: (mat, card-outlined);
88

99
// Tokens that can't be configured through Angular Material's current theming API,
1010
// but may be in a future version of the theming API.

src/material/card/_m3-elevated-card.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, elevated-card);
6+
$prefix: (mat, card-elevated);
77

88
/// Generates the tokens for MDC elevated-card
99
/// @param {Map} $systems The MDC system tokens

src/material/card/_m3-outlined-card.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, outlined-card);
6+
$prefix: (mat, card-outlined);
77

88
/// Generates the tokens for MDC outlined-card
99
/// @param {Map} $systems The MDC system tokens

src/material/core/selection/pseudo-checkbox/_m2-full-pseudo-checkbox.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../../style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, full-pseudo-checkbox);
6+
$prefix: (mat, pseudo-checkbox-full);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/core/selection/pseudo-checkbox/_m2-minimal-pseudo-checkbox.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../../style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, minimal-pseudo-checkbox);
6+
$prefix: (mat, pseudo-checkbox-minimal);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/core/selection/pseudo-checkbox/_m3-full-pseudo-checkbox.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../../tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, full-pseudo-checkbox);
6+
$prefix: (mat, pseudo-checkbox-full);
77

88
/// Generates custom tokens for the full variant of mat-pseudo-checkbox.
99
/// @param {Map} $systems The MDC system tokens

src/material/core/selection/pseudo-checkbox/_m3-minimal-pseudo-checkbox.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../../tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, minimal-pseudo-checkbox);
6+
$prefix: (mat, pseudo-checkbox-minimal);
77

88
/// Generates custom tokens for the minimal variant of mat-pseudo-checkbox.
99
/// @param {Map} $systems The MDC system tokens

src/material/core/theming/tests/m3-theme.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ describe('M3 theme', () => {
162162
}
163163
`);
164164

165-
expect(css).toContain('--mat-filled-text-field-caret-color: magenta');
166-
expect(css).not.toContain('--mat-outline-text-field-caret-color: magenta');
165+
expect(css).toContain('--mat-form-field-filled-caret-color: magenta');
166+
expect(css).not.toContain('--mat-form-field-outlined-caret-color: magenta');
167167
expectNoWarning(/`filled-caret-color` is deprecated/);
168168
});
169169

@@ -174,8 +174,8 @@ describe('M3 theme', () => {
174174
}
175175
`);
176176

177-
expect(css).toContain('--mat-filled-text-field-caret-color: magenta');
178-
expect(css).toContain('--mat-outlined-text-field-caret-color: magenta');
177+
expect(css).toContain('--mat-form-field-filled-caret-color: magenta');
178+
expect(css).toContain('--mat-form-field-outlined-caret-color: magenta');
179179
expectWarning(
180180
/Token `caret-color` is deprecated. Please use one of the following alternatives: filled-caret-color, outlined-caret-color/,
181181
);

src/material/form-field/_m2-filled-text-field.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use '../core/tokens/m2-utils';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, filled-text-field);
9+
$prefix: (mat, form-field-filled);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

src/material/form-field/_m2-outlined-text-field.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@use '../core/tokens/m2-utils';
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
7-
$prefix: (mat, outlined-text-field);
7+
$prefix: (mat, form-field-outlined);
88

99
// Tokens that can't be configured through Angular Material's current theming API,
1010
// but may be in a future version of the theming API.

src/material/form-field/_m3-filled-text-field.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, filled-text-field);
6+
$prefix: (mat, form-field-filled);
77

88
/// Generates the tokens for MDC filled-text-field
99
/// @param {Map} $systems The MDC system tokens

src/material/form-field/_m3-outlined-text-field.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, outlined-text-field);
6+
$prefix: (mat, form-field-outlined);
77

88
/// Generates the tokens for MDC outlined-text-field
99
/// @param {Map} $systems The MDC system tokens

src/material/progress-bar/_m2-progress-bar.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@use 'sass:meta';
66

77
// The prefix used to generate the fully qualified name for tokens in this file.
8-
$prefix: (mat, linear-progress);
8+
$prefix: (mat, progress-bar);
99

1010
// Tokens that can't be configured through Angular Material's current theming API,
1111
// but may be in a future version of the theming API.

src/material/progress-bar/_m3-progress-bar.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@use '../core/tokens/m3-utils';
33

44
// The prefix used to generate the fully qualified name for tokens in this file.
5-
$prefix: (mat, linear-progress);
5+
$prefix: (mat, progress-bar);
66

77
/// Generates the tokens for MDC linear-progress
88
/// @param {Map} $systems The MDC system tokens

src/material/progress-spinner/_m2-progress-spinner.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m2-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, circular-progress);
6+
$prefix: (mat, progress-spinner);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/progress-spinner/_m3-progress-spinner.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@use '../core/tokens/m3-utils';
33

44
// The prefix used to generate the fully qualified name for tokens in this file.
5-
$prefix: (mat, circular-progress);
5+
$prefix: (mat, progress-spinner);
66

77
/// Generates the tokens for MDC circular-progress
88
/// @param {Map} $systems The MDC system tokens

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use 'sass:map';
77

88
// The prefix used to generate the fully qualified name for tokens in this file.
9-
$prefix: (mat, switch);
9+
$prefix: (mat, slide-toggle);
1010

1111
// Tokens that can't be configured through Angular Material's current theming API,
1212
// but may be in a future version of the theming API.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/elevation';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, switch);
6+
$prefix: (mat, slide-toggle);
77

88
/// Generates custom tokens for the mat-slide-toggle.
99
/// @param {Map} $systems The MDC system tokens

src/material/tabs/_m2-secondary-navigation-tab.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@use '../core/tokens/m2-utils';
66

77
// The prefix used to generate the fully qualified name for tokens in this file.
8-
$prefix: (mat, secondary-navigation-tab);
8+
$prefix: (mat, tab);
99

1010
// Tokens that can't be configured through Angular Material's current theming API,
1111
// but may be in a future version of the theming API.

src/material/tabs/_m2-tab-header-with-background.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, tab-header-with-background);
6+
$prefix: (mat, tab);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/tabs/_m2-tab-header.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/style/sass-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, tab-header);
6+
$prefix: (mat, tab);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/tabs/_m2-tab-indicator.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m2-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, tab-indicator);
6+
$prefix: (mat, tab);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/tabs/_m3-secondary-navigation-tab.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@use '../core/tokens/m3-utils';
22

33
// The prefix used to generate the fully qualified name for tokens in this file.
4-
$prefix: (mat, secondary-navigation-tab);
4+
$prefix: (mat, tab);
55

66
/// Generates the tokens for MDC tab
77
/// @param {Map} $systems The MDC system tokens

src/material/tabs/_m3-tab-header.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m3-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, tab-header);
6+
$prefix: (mat, tab);
77

88
/// Generates custom tokens for the mat-tab-header.
99
/// @param {Map} $systems The MDC system tokens

src/material/tabs/_m3-tab-indicator.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@use '../core/tokens/m3-utils';
33

44
// The prefix used to generate the fully qualified name for tokens in this file.
5-
$prefix: (mat, tab-indicator);
5+
$prefix: (mat, tab);
66

77
/// Generates the tokens for MDC tab-indicator
88
/// @param {Map} $systems The MDC system tokens

src/material/tooltip/_m2-tooltip.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/tokens/m2-utils';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
6-
$prefix: (mat, plain-tooltip);
6+
$prefix: (mat, tooltip);
77

88
// Tokens that can't be configured through Angular Material's current theming API,
99
// but may be in a future version of the theming API.

src/material/tooltip/_m3-tooltip.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@use 'sass:map';
33

44
// The prefix used to generate the fully qualified name for tokens in this file.
5-
$prefix: (mat, plain-tooltip);
5+
$prefix: (mat, tooltip);
66

77
/// Generates the tokens for MDC plain-tooltip
88
/// @param {Map} $systems The MDC system tokens

0 commit comments

Comments
 (0)