Last active
July 5, 2021 21:07
-
-
Save MarkTechson/6283b6a3b353f9e38964af0740e29280 to your computer and use it in GitHub Desktop.
Example of the USE Syntax
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
/** | |
* @license | |
* Copyright Google LLC All Rights Reserved. | |
* | |
* Use of this source code is governed by an MIT-style license that can be | |
* found in the LICENSE file at https://angular.io/license | |
*/ | |
// Here's an example of the before and after. | |
// BEFORE | |
@import '~@angular/material/theming; | |
@include mat-core(); | |
$primary: mat-palette($mat-indigo); | |
$accent: mat-palette($mat-pink); | |
$theme: mat-light-theme(( | |
color: ( | |
primary: $primary, | |
accent: $accent | |
) | |
)); | |
@include angular-material-theme($theme); | |
// AFTER | |
@use '~@angular/material' as mat; | |
@include mat.core(); | |
$primary: mat.define-palette(palette.$indigo-palette); | |
$accent: mat.define-palette(palette.$pink-palette); | |
$theme: mat.define-light-theme(( | |
color: ( | |
primary: $primary, | |
accent: $accent | |
) | |
)); | |
@include mat.all-component-themes($theme); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment