Last active
February 1, 2021 02:41
Star
You must be signed in to star a gist
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); | |
} |
Hi @paulayo93 ! For detailed guide check https://medium.com/@tomastrajan/the-complete-guide-to-angular-material-themes-4d165a9d24d1
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 Tomas, thanks for sharing this theming tutorial.
Please, I need help with using the theme, after declaring it in the "my-dark-theme" class.
How would I make it reflect on my pages declaring the angular-material-theme in the my-dark-theme class?
Thanks