Skip to content

Commit 691b7b2

Browse files
committed
refactor: ensure some ref colors are included for select and sidenav
1 parent e2cd3b4 commit 691b7b2

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

src/material/core/theming/tests/theming-definition-api.spec.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,12 @@ describe('theming definition api', () => {
8383
expect(vars['version']).toBe('1');
8484
expect(vars['type']).toBe('light');
8585
expect(vars['palettes'].split(', ')).toEqual([
86-
'0',
87-
'10',
88-
'20',
89-
'25',
90-
'30',
91-
'35',
92-
'40',
93-
'50',
94-
'60',
95-
'70',
96-
'80',
97-
'90',
98-
'95',
99-
'98',
100-
'99',
101-
'100',
86+
'primary',
10287
'secondary',
88+
'tertiary',
10389
'neutral',
10490
'neutral-variant',
10591
'error',
106-
'tertiary',
10792
]);
10893
expect(vars['density']).toBe('0');
10994
expect(vars['base-tokens']).toBe('true');
@@ -129,7 +114,7 @@ describe('theming definition api', () => {
129114
--token-primary: #{map.get($data, color-tokens, (mat, theme), primary)};
130115
--token-secondary: #{map.get($data, color-tokens, (mat, theme), secondary)};
131116
--token-tertiary: #{map.get($data, color-tokens, (mat, theme), tertiary)};
132-
--palette-primary: #{map.get($data, palettes, 50)};
117+
--palette-primary: #{map.get($data, palettes, primary, 50)};
133118
--palette-secondary: #{map.get($data, palettes, secondary, 50)};
134119
--palette-tertiary: #{map.get($data, palettes, tertiary, 50)};
135120
--type: #{map.get($data, theme-type)};

src/material/core/tokens/_m3-tokens.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ $_cached-token-slots: null;
152152

153153
@return generate-tokens((
154154
md-sys-color: $sys-color,
155+
md-ref-palette: (
156+
neutral-10: map.get($palettes, neutral, 10),
157+
neutral-variant20: map.get($palettes, neutral-variant, 20),
158+
),
155159
// Because the elevation values are always combined with color values to create the box shadow,
156160
// elevation needs to be part of the color dimension.
157161
md-sys-elevation: m3.md-sys-elevation-values(),

src/material/core/tokens/m3/_md-sys-color.scss

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

88
// Indicates whether alternative tokens should be used
9-
$_alternate-tokens: true;
9+
$_alternate-tokens: false;
1010

1111
@function md-sys-color-values-dark($palettes) {
1212
$values: (

0 commit comments

Comments
 (0)