-
Notifications
You must be signed in to change notification settings - Fork 12k
Warn User When Detecting Styles that may be SCSS or LESS for inline styles #8472
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
Comments
Referencing the original issue where I requested that inline SASS be allowed #8470 |
cc @wardbell |
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472
I don't fully understand the reasoning behind closing issue #8470 as expressed here:
There are two arguments:
The first argument isn't persuasive. The CL could apply the processor configured in The second argument hinges on the assertion that the CLI does not preprocess files before the compiler sees them. Is that really true? I thought that we used webpack plugin to inline the templates and style files before the CLI saw the component source. If so, why can't it engage the styles preprocessor based on the information I mentioned in response to argument (1). In any case, we should document that inline styles are not pre-processed by the CLI here in the wiki. See PR #8683 I have created a PR to do that in the Angular Docs as well: |
… in CSS Cannot write them in less, sass, or stylus See issue angular#8472
That is correct. For inline styles, |
Considering there's no real pattern (using something fast like a regex or string search) that we can detect that would differentiate between SCSS/LESS and native CSS, it's really hard to do this and would significantly lower compilation speed. Or did you mean detect any inline style and show a warning? |
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472
Cannot write them in less, sass, or stylus See issue angular#8472
Cannot write them in less, sass, or stylus See issue #8472
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472
Cannot write them in less, sass, or stylus See issue #8472
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472 PR Close #20701
Cannot write them in less, sass, or stylus See CLI issue angular/angular-cli#8472 PR Close #20701
Cannot write them in less, sass, or stylus See issue angular#8472
Hmm...is there perhaps an opportunity to support sass/less for inline styles with the ivy rendering engine? |
Closing as this is working as intended. And showing a warning when the inline styles is no CSS is expensive and not always accurate. As we know what type of per-processor to use purely based on the file extension. It is also highlighted in the AIO docs that inline styles need to be in css https://angular.io/guide/component-styles |
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. |
Bug Report or Feature Request (mark with an
x
)Versions.
Angular CLI: 1.5.0
Node: 8.9.1
OS: darwin x64
macOS Sierra 10.12.6
Repro steps.
ng new foo --styles scss
ng serve -o
The log given by the failure.
The styles compile as CSS, with no errors.
Desired functionality.
I would like to see angular warn when detecting SASS or LESS in inline styles and the CLI json file has SCSS or LESS identified.
as per chat with @StephenFluin
The text was updated successfully, but these errors were encountered: