Skip to content

refactor: sync missed changes in g3 #31363

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 1 commit into from
Jun 16, 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
10 changes: 4 additions & 6 deletions src/material/button/_icon-button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@
);
$calculated-size: map.get($size-map, $density-scale);

@include sass-utils.current-selector-or-root() {
@include token-utils.values(
m2-icon-button.get-density-tokens(
$theme, $exclude: (icon-button-state-layer-size))
);
}
@include token-utils.values(
m2-icon-button.get-density-tokens(
$theme, $exclude: (icon-button-state-layer-size))
);

// Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
.mat-mdc-icon-button.mat-mdc-button-base {
Expand Down
13 changes: 6 additions & 7 deletions src/material/progress-bar/_progress-bar-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
}

@mixin color($theme, $color-variant: null) {
$tokens: m2-progress-bar.get-color-tokens($theme, primary);
@if inspection.get-theme-version($theme) == 1 {
$tokens: map.get(m3-progress-bar.get-tokens($theme, $color-variant), color);
}

@include token-utils.values($tokens);

@if inspection.get-theme-version($theme) != 1 {
@include token-utils.values(
map.get(m3-progress-bar.get-tokens($theme, $color-variant), color));
} @else {
.mat-mdc-progress-bar {
$tokens: m2-progress-bar.get-color-tokens($theme, primary);
@include token-utils.values($tokens);

&.mat-accent {
$tokens: m2-progress-bar.get-color-tokens($theme, secondary);
@include token-utils.values($tokens);
Expand Down
16 changes: 12 additions & 4 deletions src/material/slide-toggle/_slide-toggle-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,20 @@
/// Outputs typography theme styles for the mat-slide-toggle.
/// @param {Map} $theme The theme to generate typography styles for.
@mixin typography($theme) {
$tokens: m2-slide-toggle.get-typography-tokens($theme);
@if inspection.get-theme-version($theme) == 1 {
$tokens: map.get(m3-slide-toggle.get-tokens($theme), typography);
}
@include token-utils.values(
map.get(m3-slide-toggle.get-tokens($theme), typography));
} @else {
@include sass-utils.current-selector-or-root() {
// TODO: See if this can be removed
@include token-utils.values(m2-slide-toggle.get-typography-tokens($theme));

@include token-utils.values($tokens);
.mat-mdc-slide-toggle {
@include token-utils.values(
m2-slide-toggle.get-typography-tokens($theme));
}
}
}
}

/// Outputs density theme styles for the mat-slide-toggle.
Expand Down
Loading