Skip to content

Commit

Permalink
docs: add note about mat-app-background to theming guide (#24125)
Browse files Browse the repository at this point in the history
We used to have this note in the old theming guide, but it looks like it was lost in-between the rewrites.

Fixes #24090.

(cherry picked from commit 341d14b)
  • Loading branch information
crisbeto authored and andrewseguin committed Feb 18, 2022
1 parent 580039d commit 3ffcd2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions guides/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,14 @@ You can define multiple themes in separate files by creating multiple theme file
this property to `false`, your application becomes responsible for manually loading the desired
file. The approach for this loading depends on your application.

### Application background color

By default, Angular Material does not apply any styles to your DOM outside
of its own components. If you want to set your application's background color
to match the components' theme, you can either:
1. Put your application's main content inside `mat-sidenav-container`, assuming you're using `MatSidenav`, or
2. Apply the `mat-app-background` CSS class to your main content root element (typically `body`).

### Scoping style customizations

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

0 comments on commit 3ffcd2e

Please sign in to comment.