Skip to content

Commit 1e7eeab

Browse files
crisbetojelbourn
authored andcommitted
fix(theming): provide text color through mat-app-background (#9262)
Add the default foreground text color to the `.mat-app-background`, otherwise the consumer can end up with dark text on a dark background if they're using a dark theme. Relates to #9231.
1 parent 99b768e commit 1e7eeab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/core/_core.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
// user's content isn't inside of a `mat-sidenav-container`.
4040
.mat-app-background {
4141
$background: map-get($theme, background);
42+
$foreground: map-get($theme, foreground);
43+
4244
background-color: mat-color($background, background);
45+
color: mat-color($foreground, text);
4346
}
4447

4548
// Marker that is used to determine whether the user has added a theme to their page.

0 commit comments

Comments
 (0)