You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(material/core): expose new @use-based Sass API
Reworks the public Sass API to take advantage of `@use` in order to allow for a single
entry point into `@angular/material` or `@angular/cdk`. Some mixins and variables were
renamed in order be a better reflection of what they do.
Before:
```
@import '~@angular/material/theming';
@include mat-core();
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
$candy-app-warn: mat-palette($mat-red);
$candy-app-theme: mat-light-theme((
color: (
primary: $candy-app-primary,
accent: $candy-app-accent,
warn: $candy-app-warn,
)
));
@include angular-material-theme($candy-app-theme);
```
After:
```
@use '~@angular/material' as mat;
@include mat.core();
$candy-app-primary: mat.define-palette(mat.$indigo-palette);
$candy-app-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$candy-app-warn: mat.define-palette(mat.$red-palette);
$candy-app-theme: mat.define-light-theme((
color: (
primary: $candy-app-primary,
accent: $candy-app-accent,
warn: $candy-app-warn,
)
));
@include mat.all-component-themes($candy-app-theme);
```
0 commit comments