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

Consider removing !global #239

Closed
darrynhoskingluna opened this issue Oct 7, 2019 · 3 comments · Fixed by #241
Closed

Consider removing !global #239

darrynhoskingluna opened this issue Oct 7, 2019 · 3 comments · Fixed by #241

Comments

@darrynhoskingluna
Copy link

When including this library in an Angular 8 project and importing the SCSS files so i can override the variables, you get warnings.

When including like this to override the size of the dot

$wz-big-dot-width: 25px !default;
$wz-big-dot-height: 25px !default;
@import "~angular-archwizard/archwizard.scss";

This warning is printed when building

DEPRECATION WARNING: As of Dart Sass 2.0.0, !global assignments won't be able to
declare new variables. Since this assignment is at the root of the stylesheet,
the !global flag is unnecessary and can safely be removed.


44 │ $wz-param-indicator-state: null !global;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modules\angular-archwizard\variables.scss 44:1 @import
node_modules\angular-archwizard\archwizard.scss 1:9 @import
stdin 14:9 root stylesheet

DEPRECATION WARNING: As of Dart Sass 2.0.0, !global assignments won't be able to
declare new variables. Since this assignment is at the root of the stylesheet,
the !global flag is unnecessary and can safely be removed.


47 │ $wz-param-indicator-color: null !global;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modules\angular-archwizard\variables.scss 47:1 @import
node_modules\angular-archwizard\archwizard.scss 1:9 @import
stdin 14:9 root stylesheet

@madoar
Copy link
Owner

madoar commented Oct 10, 2019

Thanks for reporting!

@earshinov you are more knowledgeable about SCSS than me, can you please share your thoughts on this?

@darrynhoskingluna
Copy link
Author

@madoar no problem, to remove the warning it is fairly simple, just doing as the warning suggests and removing the !global from the two reported lines.

In variable.scss
change line 44
$wz-param-indicator-state: null !global;
to
$wz-param-indicator-state: null;
Change line 47
$wz-param-indicator-color: null !global;
to
$wz-param-indicator-color: null;

These changes are enough to fix the warning, but i see there is a few other uses of !global i am also not 100% sure if these should be removed at all.

@earshinov
Copy link
Contributor

Hi @madoar , @darrynhoskingluna .

!global at root level serves no purpose indeed. I will prepare a PR to remove them.

Other usages are needed. Otherwise, each of them will declare a new variable instead of re-defining a global one.

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

Successfully merging a pull request may close this issue.

3 participants