-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(schematics): do not generate invalid stylesheet files #15235
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
fix(schematics): do not generate invalid stylesheet files #15235
Conversation
* List of supported styles which are CSS supersets. All supported CLI style extensions can be | ||
* found here: angular/angular-cli/master/packages/schematics/angular/ng-new/schema.json#L118-L122 | ||
*/ | ||
const supportedCssSupersets = ['scss', 'less']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jelbourn I decided to do in a safelist-fashion as "technically" the CLI could add new unsupported style extensions which will then break. This way we guarantee that we never generate invalid stylesheets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the right call 👍
* List of supported styles which are CSS supersets. All supported CLI style extensions can be | ||
* found here: angular/angular-cli/master/packages/schematics/angular/ng-new/schema.json#L118-L122 | ||
*/ | ||
const supportedCssSupersets = ['scss', 'less']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the right call 👍
Currently whenever someone specified Stylus or Sass as the default style extension for their Angular CLI project, the CDK/ Material schematics incorrectly generate files with that given extension. This is problematic because the schematic style templates are written in CSS and therefore are not compatible with Stylus or Sass (which are not supersets of CSS unlike less, scss) Fixes angular#15164
806479b
to
c904590
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently whenever someone specified Stylus or Sass as the default style extension for their Angular CLI project, the CDK/ Material schematics incorrectly generate files with that given extension. This is problematic because the schematic style templates are written in CSS and therefore are not compatible with Stylus or Sass (which are not supersets of CSS unlike less, scss) Fixes #15164
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently whenever someone specified Stylus or Sass as the
default style extension for their Angular CLI project, the CDK/
Material schematics incorrectly generate files with that given
extension. This is problematic because the schematic style
templates are written in CSS and therefore are not compatible
with Stylus or Sass (which are not supersets of CSS unlike less, scss)
Fixes #15164