|
| 1 | +@import '../../dist/packages/material/core/theming/all-theme'; |
| 2 | +// Plus imports for other components in your app. |
| 3 | + |
| 4 | +// Include the common styles for Angular Material. We include this here so that you only |
| 5 | +// have to load a single css file for Angular Material in your app. |
| 6 | +// **Be sure that you only ever include this mixin once!** |
| 7 | +@include mat-core(); |
| 8 | + |
| 9 | +// Define the default theme (same as the example above). |
| 10 | +$candy-app-primary: mat-palette($mat-indigo); |
| 11 | +$candy-app-accent: mat-palette($mat-pink, A200, A100, A400); |
| 12 | +$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent); |
| 13 | + |
| 14 | +// Include the default theme styles. |
| 15 | +@include angular-material-theme($candy-app-theme); |
| 16 | + |
| 17 | + |
| 18 | +// Define an alternate dark theme. |
| 19 | +$dark-primary: mat-palette($mat-blue-grey); |
| 20 | +$dark-accent: mat-palette($mat-amber, A200, A100, A400); |
| 21 | +$dark-warn: mat-palette($mat-deep-orange); |
| 22 | +$dark-theme: mat-dark-theme($dark-primary, $dark-accent, $dark-warn); |
| 23 | + |
| 24 | +// Include the alternative theme styles inside of a block with a CSS class. You can make this |
| 25 | +// CSS class whatever you want. In this example, any component inside of an element with |
| 26 | +// `.unicorn-dark-theme` will be affected by this alternate dark theme instead of the default theme. |
| 27 | +.unicorn-dark-theme { |
| 28 | + @include angular-material-theme($dark-theme); |
| 29 | +} |
0 commit comments