Skip to content

Commit 5d93395

Browse files
committed
fix(material/core): Fix incorrect color role mappings (#29655)
(cherry picked from commit 4771931)
1 parent fe3f30f commit 5d93395

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('theming definition api', () => {
122122
}
123123
`);
124124
const vars = getRootVars(css);
125-
expect(vars['token-surface']).toBe('#1c1c17');
125+
expect(vars['token-surface']).toBe('#14140f');
126126
expect(vars['token-primary']).toBe('#cdcd00');
127127
expect(vars['token-secondary']).toBe('#cac8a5');
128128
expect(vars['token-tertiary']).toBe('#ffb4a8');

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $_default-dark: (
1313

1414
@function values-dark($deps: $_default-dark) {
1515
@return (
16-
'background': map.get($deps, 'md-ref-palette', 'neutral10'),
16+
'background': map.get($deps, 'md-ref-palette', 'neutral6'),
1717
'error': map.get($deps, 'md-ref-palette', 'error80'),
1818
'error-container': map.get($deps, 'md-ref-palette', 'error30'),
1919
'inverse-on-surface': map.get($deps, 'md-ref-palette', 'neutral20'),
@@ -32,7 +32,7 @@ $_default-dark: (
3232
'on-secondary-fixed-variant':
3333
map.get($deps, 'md-ref-palette', 'secondary30'),
3434
'on-surface': map.get($deps, 'md-ref-palette', 'neutral90'),
35-
'on-surface-variant': map.get($deps, 'md-ref-palette', 'neutral-variant80'),
35+
'on-surface-variant': map.get($deps, 'md-ref-palette', 'neutral-variant90'),
3636
'on-tertiary': map.get($deps, 'md-ref-palette', 'tertiary20'),
3737
'on-tertiary-container': map.get($deps, 'md-ref-palette', 'tertiary90'),
3838
'on-tertiary-fixed': map.get($deps, 'md-ref-palette', 'tertiary10'),
@@ -49,11 +49,11 @@ $_default-dark: (
4949
'secondary-fixed': map.get($deps, 'md-ref-palette', 'secondary90'),
5050
'secondary-fixed-dim': map.get($deps, 'md-ref-palette', 'secondary80'),
5151
'shadow': map.get($deps, 'md-ref-palette', 'neutral0'),
52-
'surface': map.get($deps, 'md-ref-palette', 'neutral10'),
52+
'surface': map.get($deps, 'md-ref-palette', 'neutral6'),
5353
'surface-bright': map.get($deps, 'md-ref-palette', 'neutral24'),
5454
'surface-container': map.get($deps, 'md-ref-palette', 'neutral12'),
5555
'surface-container-high': map.get($deps, 'md-ref-palette', 'neutral17'),
56-
'surface-container-highest': map.get($deps, 'md-ref-palette', 'neutral22'),
56+
'surface-container-highest': map.get($deps, 'md-ref-palette', 'neutral24'),
5757
'surface-container-low': map.get($deps, 'md-ref-palette', 'neutral10'),
5858
'surface-container-lowest': map.get($deps, 'md-ref-palette', 'neutral4'),
5959
'surface-dim': map.get($deps, 'md-ref-palette', 'neutral6'),
@@ -72,7 +72,7 @@ $_default-light: (
7272

7373
@function values-light($deps: $_default-light) {
7474
@return (
75-
'background': map.get($deps, 'md-ref-palette', 'neutral99'),
75+
'background': map.get($deps, 'md-ref-palette', 'neutral98'),
7676
'error': map.get($deps, 'md-ref-palette', 'error40'),
7777
'error-container': map.get($deps, 'md-ref-palette', 'error90'),
7878
'inverse-on-surface': map.get($deps, 'md-ref-palette', 'neutral95'),
@@ -108,7 +108,7 @@ $_default-light: (
108108
'secondary-fixed': map.get($deps, 'md-ref-palette', 'secondary90'),
109109
'secondary-fixed-dim': map.get($deps, 'md-ref-palette', 'secondary80'),
110110
'shadow': map.get($deps, 'md-ref-palette', 'neutral0'),
111-
'surface': map.get($deps, 'md-ref-palette', 'neutral99'),
111+
'surface': map.get($deps, 'md-ref-palette', 'neutral98'),
112112
'surface-bright': map.get($deps, 'md-ref-palette', 'neutral98'),
113113
'surface-container': map.get($deps, 'md-ref-palette', 'neutral94'),
114114
'surface-container-high': map.get($deps, 'md-ref-palette', 'neutral92'),

0 commit comments

Comments
 (0)