Skip to content

Commit

Permalink
feat(material/schematics): add migration to switch to the new theming…
Browse files Browse the repository at this point in the history
… API (#22304)

Adds an `ng-generate` schematic that will switch over existing stylesheets to the new `@use`-based API. Furthermore, the migration code is set up in a way that should allow us to run it in g3 if necessary.
  • Loading branch information
crisbeto authored Mar 27, 2021
1 parent b8d83cb commit 183c59f
Show file tree
Hide file tree
Showing 7 changed files with 884 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cdk/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
@forward './overlay/overlay' show overlay;
@forward './overlay/overlay' show overlay, $z-index-overlay-container, $z-index-overlay,
$z-index-overlay-backdrop, $dark-backdrop-background;
@forward './a11y/a11y' show a11y-visually-hidden, high-contrast;
@forward './text-field/text-field' show text-field-autosize, text-field-autofill,
text-field-autofill-color;
text-field-autofill-color,
// `text-field` is deprecated, but we have to export it
// here in order for the theming API schematic to work.
text-field;
6 changes: 6 additions & 0 deletions src/material/schematics/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
"factory": "./ng-generate/address-form/index",
"schema": "./ng-generate/address-form/schema.json",
"aliases": ["address-form", "material-address-form", "material-addressForm"]
},
"themingApi": {
"description": "Switch the project to the new @use-based Material theming API",
"factory": "./ng-generate/theming-api/index",
"schema": "./ng-generate/theming-api/schema.json",
"aliases": ["theming-api", "sass-api"]
}
}
}
Loading

0 comments on commit 183c59f

Please sign in to comment.