From f05850fea59ee12adb16c74be5a711da18ed6b05 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Sat, 6 Jan 2018 18:33:41 +0100 Subject: [PATCH] fix(theming): provide text color through mat-app-background 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. --- src/lib/core/_core.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/core/_core.scss b/src/lib/core/_core.scss index a4aef3daca70..545956e1898a 100644 --- a/src/lib/core/_core.scss +++ b/src/lib/core/_core.scss @@ -43,7 +43,10 @@ // user's content isn't inside of a `mat-sidenav-container`. .mat-app-background { $background: map-get($theme, background); + $foreground: map-get($theme, foreground); + background-color: mat-color($background, background); + color: mat-color($foreground, text); } // Marker that is used to determine whether the user has added a theme to their page.