Skip to content

Commit 2d5ed46

Browse files
author
Andrew Seguin
committed
refactor: use system background
1 parent 4932b47 commit 2d5ed46

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/material/badge/_m2-badge.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $_large-size: $_default-size + 6px;
4242
// Tokens that can be configured through Angular Material's color theming API.
4343
@function get-color-tokens($theme) {
4444
$primary-color-tokens: private-get-color-palette-color-tokens($theme, primary);
45-
$app-background: inspection.get-theme-color($theme, background, background);
45+
$app-background: inspection.get-theme-color($theme, system, background);
4646
$disabled-background: inspection.get-theme-color($theme, foreground, disabled-button);
4747

4848
// The disabled color usually has some kind of opacity, but because the badge is overlayed

src/material/core/_m2-app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Tokens that can be configured through Angular Material's color theming API.
1212
@function get-color-tokens($theme) {
1313
$tokens: (
14-
app-background-color: inspection.get-theme-color($theme, background, background),
14+
app-background-color: inspection.get-theme-color($theme, system, background),
1515
app-text-color: inspection.get-theme-color($theme, system, on-surface),
1616
);
1717

src/material/core/m2/_theming.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
surface: white,
128128
on-surface: rgba(black, 0.87),
129129
outline: rgba(black, 0.12),
130+
background: map.get(palette.$grey-palette, 50),
130131
hover-state-layer-opacity: 0.04,
131132
focus-state-layer-opacity: 0.12,
132133
pressed-state-layer-opacity: 0.12,
@@ -147,6 +148,7 @@
147148
system: (
148149
surface: map.get(palette.$grey-palette, 800),
149150
on-surface: white,
151+
background: #303030,
150152
outline: rgba(white, 0.12),
151153
hover-state-layer-opacity: 0.04,
152154
focus-state-layer-opacity: 0.12,

src/material/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@function get-color-tokens($theme, $palette-name: accent) {
1111
$is-dark: inspection.get-theme-type($theme) == dark;
1212
$disabled-color: if($is-dark, #686868, #b0b0b0);
13-
$checkmark-color: inspection.get-theme-color($theme, background, background);
13+
$checkmark-color: inspection.get-theme-color($theme, system, background);
1414

1515
@return (
1616
pseudo-checkbox-full-selected-icon-color: inspection.get-theme-color($theme, $palette-name),

src/material/sidenav/_m2-sidenav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
sidenav-container-divider-color: inspection.get-theme-color($theme, system, outline),
2727
sidenav-container-background-color: inspection.get-theme-color($theme, system, surface),
2828
sidenav-container-text-color: inspection.get-theme-color($theme, system, on-surface),
29-
sidenav-content-background-color: inspection.get-theme-color($theme, background, background),
29+
sidenav-content-background-color: inspection.get-theme-color($theme, system, background),
3030
sidenav-content-text-color: inspection.get-theme-color($theme, system, on-surface),
3131

3232
// We use invert() here to have the darken the background color expected to be used.

0 commit comments

Comments
 (0)