Last active
February 1, 2021 02:41
-
-
Save tomastrajan/0007da8cd177143efc9659bf5ac99354 to your computer and use it in GitHub Desktop.
Angular Material Theming - multiple themes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '~@angular/material/theming'; | |
// always include only once per project | |
@include mat-core(); | |
// import our custom themes | |
@import 'my-theme.scss'; | |
@import 'my-light-theme.scss'; | |
@import 'my-dark-theme.scss'; | |
.my-theme { | |
@include angular-material-theme($my-theme); | |
} | |
// additional css classes | |
// you can hardcode one of them on the <body> tag | |
// or switch dynamically during runtime with [class] | |
.my-light-theme { | |
@include angular-material-theme($my-light-theme); | |
} | |
.my-dark-theme { | |
@include angular-material-theme($my-dark-theme); | |
} |
Okay, I will go through it. Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @paulayo93 ! For detailed guide check https://medium.com/@tomastrajan/the-complete-guide-to-angular-material-themes-4d165a9d24d1