Skip to content

Commit 8c9cae0

Browse files
andrewseguinAndrew Seguin
andauthored
fix(material/chips): sync with g3 (#31393)
Co-authored-by: Andrew Seguin <[email protected]>
1 parent 25c31fd commit 8c9cae0

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/material/chips/_chips-theme.scss

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
/// for the mat-chips.
1111
/// @param {Map} $theme The theme to generate base styles for.
1212
@mixin base($theme) {
13-
$tokens: m2-chip.get-unthemable-tokens($theme);
1413
@if inspection.get-theme-version($theme) == 1 {
15-
$tokens: map.get(m3-chip.get-tokens($theme), base);
14+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), base));
15+
} @else {
16+
.mat-mdc-standard-chip {
17+
@include token-utils.values(m2-chip.get-unthemable-tokens($theme));
18+
}
1619
}
17-
18-
@include token-utils.values($tokens);
1920
}
2021

2122
/// Outputs color theme styles for the mat-chips.
@@ -50,23 +51,25 @@
5051
/// Outputs typography theme styles for the mat-chips.
5152
/// @param {Map} $theme The theme to generate typography styles for.
5253
@mixin typography($theme) {
53-
$tokens: m2-chip.get-typography-tokens($theme);
5454
@if inspection.get-theme-version($theme) == 1 {
55-
$tokens: map.get(m3-chip.get-tokens($theme), typography);
55+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), typography));
56+
} @else {
57+
.mat-mdc-standard-chip {
58+
@include token-utils.values(m2-chip.get-typography-tokens($theme));
59+
}
5660
}
57-
58-
@include token-utils.values($tokens);
5961
}
6062

6163
/// Outputs density theme styles for the mat-chips.
6264
/// @param {Map} $theme The theme to generate density styles for.
6365
@mixin density($theme) {
64-
$tokens: m2-chip.get-density-tokens($theme);
6566
@if inspection.get-theme-version($theme) == 1 {
66-
$tokens: map.get(m3-chip.get-tokens($theme), density);
67+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), density));
68+
} @else {
69+
.mat-mdc-chip.mat-mdc-standard-chip {
70+
@include token-utils.values(m2-chip.get-density-tokens($theme));
71+
}
6772
}
68-
69-
@include token-utils.values($tokens);
7073
}
7174

7275
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.

0 commit comments

Comments
 (0)