Skip to content

fix(multiple): rename token prefixes to match components #30802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/material/button-toggle/_m2-legacy-button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates custom tokens for the mat-button-toggle.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-extended-fab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use '../core/theming/inspection';

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

@function get-unthemable-tokens() {
@return (
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-filled-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-outlined-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use 'sass:map';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-protected-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@use '../core/style/elevation';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-text-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m2-tonal-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-extended-fab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC extended-fab
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-filled-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

/// Generates custom tokens for the mat-flat-button.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-outlined-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates custom tokens for the mat-outlined-button.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-protected-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

/// Generates custom tokens for the mat-raised-button.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-text-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates custom tokens for the mat-button.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/button/_m3-tonal-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates custom tokens for the mat-flat-button.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/card/_m2-elevated-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/card/_m2-outlined-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/card/_m3-elevated-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC elevated-card
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/card/_m3-outlined-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC outlined-card
/// @param {Map} $systems The MDC system tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../../style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../../style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../../tokens/m3-utils';

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

/// Generates custom tokens for the full variant of mat-pseudo-checkbox.
/// @param {Map} $systems The MDC system tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../../tokens/m3-utils';

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

/// Generates custom tokens for the minimal variant of mat-pseudo-checkbox.
/// @param {Map} $systems The MDC system tokens
Expand Down
8 changes: 4 additions & 4 deletions src/material/core/theming/tests/m3-theme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ describe('M3 theme', () => {
}
`);

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

Expand All @@ -174,8 +174,8 @@ describe('M3 theme', () => {
}
`);

expect(css).toContain('--mat-filled-text-field-caret-color: magenta');
expect(css).toContain('--mat-outlined-text-field-caret-color: magenta');
expect(css).toContain('--mat-form-field-filled-caret-color: magenta');
expect(css).toContain('--mat-form-field-outlined-caret-color: magenta');
expectWarning(
/Token `caret-color` is deprecated. Please use one of the following alternatives: filled-caret-color, outlined-caret-color/,
);
Expand Down
2 changes: 1 addition & 1 deletion src/material/form-field/_m2-filled-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/form-field/_m2-outlined-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/form-field/_m3-filled-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

/// Generates the tokens for MDC filled-text-field
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/form-field/_m3-outlined-text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

/// Generates the tokens for MDC outlined-text-field
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/progress-bar/_m2-progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@use 'sass:meta';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/progress-bar/_m3-progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC linear-progress
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/progress-spinner/_m2-progress-spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/progress-spinner/_m3-progress-spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC circular-progress
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/slide-toggle/_m2-slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@use 'sass:map';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/slide-toggle/_m3-slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/elevation';

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

/// Generates custom tokens for the mat-slide-toggle.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m2-secondary-navigation-tab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m2-tab-header-with-background.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m2-tab-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/style/sass-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m2-tab-indicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m3-secondary-navigation-tab.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC tab
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m3-tab-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates custom tokens for the mat-tab-header.
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/tabs/_m3-tab-indicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '../core/tokens/m3-utils';

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

/// Generates the tokens for MDC tab-indicator
/// @param {Map} $systems The MDC system tokens
Expand Down
2 changes: 1 addition & 1 deletion src/material/tooltip/_m2-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '../core/tokens/m2-utils';

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

// Tokens that can't be configured through Angular Material's current theming API,
// but may be in a future version of the theming API.
Expand Down
2 changes: 1 addition & 1 deletion src/material/tooltip/_m3-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use 'sass:map';

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

/// Generates the tokens for MDC plain-tooltip
/// @param {Map} $systems The MDC system tokens
Expand Down
Loading