Skip to content

Commit 341d14b

Browse files
authored
docs: add note about mat-app-background to theming guide (#24125)
We used to have this note in the old theming guide, but it looks like it was lost in-between the rewrites. Fixes #24090.
1 parent 12b8c48 commit 341d14b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

guides/theming.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ You can define multiple themes in separate files by creating multiple theme file
315315
this property to `false`, your application becomes responsible for manually loading the desired
316316
file. The approach for this loading depends on your application.
317317

318+
### Application background color
319+
320+
By default, Angular Material does not apply any styles to your DOM outside
321+
of its own components. If you want to set your application's background color
322+
to match the components' theme, you can either:
323+
1. Put your application's main content inside `mat-sidenav-container`, assuming you're using `MatSidenav`, or
324+
2. Apply the `mat-app-background` CSS class to your main content root element (typically `body`).
325+
318326
### Scoping style customizations
319327

320328
You can use Angular Material's Sass mixins to customize component styles within a specific scope

0 commit comments

Comments
 (0)