Last active
May 31, 2017 13:38
-
-
Save tomastrajan/37c7edf82f80332a35301bd414d4c416 to your computer and use it in GitHub Desktop.
Angular Material Theming - custom components
This file contains hidden or 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'; | |
@include mat-core(); | |
@import 'my-theme.scss'; | |
// import custom componenet themes | |
// unofficial naming convention to support nice ordering of files in IDE | |
// to see theme under the original style file of the componenent | |
@import 'app/shared/big-input/big-input.component.scss-theme'; | |
@import 'app/shared/flip-toggle-button/flip-toggle-button.component.scss-theme'; | |
// you only have to add additional componenets here (instead of in every theme class) | |
@mixin custom-components-theme($theme) { | |
@include big-input-theme($theme); | |
@include flip-toggle-button-theme($theme); | |
} | |
.default-theme { | |
@include angular-material-theme($my-theme); | |
// include custom components theme mixin once per theme class | |
@include custom-components-theme($my-theme); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment