schematic(theme): inject a palette definition for customization #16417
Labels
area: ng-generate
Schematics that generate code in user projects
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P4
A relatively minor issue that is not relevant to core functions
Feature Description
Currently, users need to dig into
node_modules/@angular/material/_theming.scss
and find a palette like$mat-blue
and then manually copy that into theirstyles.scss
and modify it in order to create a custom palette.This used to be easier in AngularJS Material where you could just extend an existing theme and make minor modifications.
Use Case
Proposal
ng g @angular/material:palette --base=mat-blue --path=src/styles.scss my-blue
This would inject the following into
src/styles.scss
immediately after@include mat-core();
:It would still be up to the developer to actually use the palette in defining a theme (i.e.
$app-primary: mat-palette($my-blue);
).Relates to #16416.
Related Custom theming Docs.
The text was updated successfully, but these errors were encountered: