-
Notifications
You must be signed in to change notification settings - Fork 12k
Setting the global default to scss does not affect new projects. #5599
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
You can configure the ng-cli to use scss by default with
|
If the default was .scss and I wanted to use css features, I would have to type nothing, that's kind of my point. If there aren't any objection in having .scss over .css why not do it ? |
You can also set the default globally so that all new projects for the user will use the set default. This works for other default options as well. As to why CSS is the default:
|
@clydin how would you set scss as the global default? My attempts have been fruitless. I've tried |
@clydin do you mean
The default javascript is javascript yet ts has been chosen by the angular team and the cli rolls with it. It might not be a fair comparison but it seems to hint to the community: "hey, you should use that because it's awesome, you can do this and that on top of vanilla js". "You should use scss because it's awesome too, you can do this and that on top of vanilla css" doesn't seem too far fetched imo. I know the comparison is not the best because angular is very much designed with typescript in mind, but I still think my argument is valid.
That works the other way around too, scss to css (which won't happen if one has the preprocessor installed).
Fair enough. |
I understand you prefer scss but that is a style issue. Style as in 'tabs vs spaces', not as in 'stylesheets'. I'm just not gonna get into that sort of discussion at all. But I do agree that setting the global should do that. I'll reword your title to reflect it and label it as a |
Thank you very much.
That's an unfair comparison. Tabs vs space is a binary concept while scss is for the most part a super set of css. However I understand the aforementioned reasons why it's not implemented. |
@yarrgh is your problem resolved? |
This
|
However, this following does work. Not sure if the previous comment's method is supposed to work or not...
|
@Brocco can you take a look? |
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. |
The current default is css and one needs to specifically tell the cli to do scss.
First of all I don't see any benefit in using css over scss.
Secundo, it seems it would fit right in the cli philosophy to be opinionated on what to use.
Third, it's easy to switch, but inconvenient if for example you start a project forgetting to specify it should be sass (which is 100% of the time personally), create 4 components from the get go. Now you have to go into each component.ts file and change the style extensions, change every css to scss and change cli.json.
Fourth, most people using css don't really mind having .scss files, while the other way around will throw error if you use variables or other scss features.
The cli is opinionated, why not be opinionated on this ?
The text was updated successfully, but these errors were encountered: