-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/schematics): don't drop prebuilt imports in theming API migration #22698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -716,4 +716,22 @@ describe('v12 theming API migration', () => { | |||||||||
| `@include mat.mdc-button-theme();`, | ||||||||||
| ].join('\n')); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| it('should not drop imports of prebuilt styles', async () => { | ||||||||||
| writeLines(THEME_PATH, [ | ||||||||||
| `@import '~@angular/material/prebuilt-themes/indigo-pink.css';`, | ||||||||||
| `@import '~@angular/material/theming';`, | ||||||||||
| `@import '~@angular/cdk/overlay-prebuilt.css';`, | ||||||||||
| `@include mat-core();`, | ||||||||||
| ]); | ||||||||||
|
|
||||||||||
| await runMigration(); | ||||||||||
|
|
||||||||||
| expect(splitFile(THEME_PATH)).toEqual([ | ||||||||||
| `@use '~@angular/material' as mat;`, | ||||||||||
| `@import '~@angular/material/prebuilt-themes/indigo-pink.css';`, | ||||||||||
| `@import '~@angular/cdk/overlay-prebuilt.css';`, | ||||||||||
|
Comment on lines
+732
to
+733
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be possible to migrate these to the following
Suggested change
Or is that something that you are depending upon the sass-migrator to do?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that imports of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that too at first, but found that they work fine with If you've seen an official statement from the Sass team to the otherwise, please do let me know. |
||||||||||
| `@include mat.core();`, | ||||||||||
| ]); | ||||||||||
| }); | ||||||||||
| }); | ||||||||||
Uh oh!
There was an error while loading. Please reload this page.