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

scss warnings with ng5 #182

Closed
maku opened this issue Nov 6, 2017 · 4 comments
Closed

scss warnings with ng5 #182

maku opened this issue Nov 6, 2017 · 4 comments
Labels

Comments

@maku
Copy link

maku commented Nov 6, 2017

when I am using ngx-sharebuttons 4.1.2 with ng 5.0.0 I get warnings regarding scss (with angular-cli 1.5.0)

./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss
(Emitted value instead of an instance of Error) postcss-custom-properties: /Users/martin/_work/findu_ng5/client/src/styles.scss:1752:5: variable '--hover-color' is undefined and used without a fallback
 @ ./src/styles.scss 4:14-187
 @ multi ./src/styles.scss

the reason is the import:

@import '~ngx-sharebuttons/styles/themes/default/default-theme';
@MurhafSousli
Copy link
Owner

MurhafSousli commented Nov 6, 2017

@maku I think this is a bug in angular-cli 1.5.0, the plugin they use for compiling the sass files seems not to support the variables such as --hover-color. I am not sure!

Fortunately, the compiled css is included in 4.1.2, just add .css

@maku
Copy link
Author

maku commented Nov 8, 2017

@MurhafSousli this change has no effect. The cli brings a bunch of warnings....

@maku
Copy link
Author

maku commented Nov 8, 2017

Here is an example of the warning

./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/ngx-sharebuttons/styles/themes/default/default-theme.css
(Emitted value instead of an instance of Error) postcss-custom-properties: /Users/martin/_work/findu_ng5/client/node_modules/ngx-sharebuttons/styles/themes/default/default-theme.css:1:1022: Custom property ignored: not scoped to the top-level :root element (.sb-default .sb-wrapper.sb-more { ... --color: ... })
 @ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss 4:10-206
 @ ./src/styles.scss
 @ multi ./src/styles.scss

@MurhafSousli
Copy link
Owner

@maku Yes I see, I found a related SO

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

No branches or pull requests

2 participants