Skip to content
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

How can I add global scss ? #70

Closed
wenerme opened this issue Apr 28, 2017 · 6 comments
Closed

How can I add global scss ? #70

wenerme opened this issue Apr 28, 2017 · 6 comments

Comments

@wenerme
Copy link

wenerme commented Apr 28, 2017

I found angular/angular-cli#1253 , angular/angular-cli#3700 , but do not works in angular-electron, how can I use common scss in angular-electron ?

@wenerme
Copy link
Author

wenerme commented Apr 29, 2017

I found this webpack-contrib/sass-loader#218 (comment) works for me, I use src/app/styles, but I have to mark styles as resource root to tell intellij where to resolove the import.

@joaogarin
Copy link
Owner

Hello,

This is not really relevant to electron itself. There are a couple of different ways to do that, the most common is to just add these styles to the root component and mark View Encapsulation to "none".

Best regards
Joao Garin

@joaogarin
Copy link
Owner

@wenerme
Copy link
Author

wenerme commented Apr 29, 2017

@joaogarin Is it possible to run by ng serve if I don't need electron's feature, it's easier for dev, I add a angular-cli, so I can use ng generate now, but not ng serve

@wenerme
Copy link
Author

wenerme commented Apr 29, 2017

The default is ViewEncapsulation.None for app-component, but scss variables must used by @import, so, the issues is not solved.

@joaogarin
Copy link
Owner

Hello,

Sorry but I don't follow what the issue is. I am not really familiar with the CLI so don't know how its done there. This project does not use the CLI.

But here its just a scss file imported in the app.component.ts file (root component). So you can import without any problem..You can also use multiple scss files in there if you would like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants