foundation / foundation-rails

Foundation for Rails
foundation.zurb.com
MIT License
1k stars 376 forks source link

Multiple `!global` assignments deprecation warnings on foundation-rails-6.6.2.0 #296

Closed cesarizu closed 4 months ago

cesarizu commented 4 years ago

When using foundation-rails-6.6.2.0 (and other older versions too), I get a lot of deprecation warnings on the console:

DEPRECATION WARNING on line 115 of /home/travis/build/company/project/vendor/bundle/ruby/2.6.0/gems/foundation-rails-6.6.2.0/vendor/assets/scss/util/_color.scss:

!global assignments won't be able to declare new variables in future versions.

Consider adding `$primary-color: null` at the top level.

These are all the relevant lines from the logs:

Consider adding `$alert-color: null` at the top level.
Consider adding `$primary-color: null` at the top level.
Consider adding `$secondary-color: null` at the top level.
Consider adding `$success-color: null` at the top level.
Consider adding `$warning-color: null` at the top level.
Consider adding `$-zf-bp-value: null` at the top level.
Consider adding `$-zf-size: null` at the top level.
xxx commented 4 years ago

We also started seeing these after updating to sassc v.2.4.0.

nbw commented 4 years ago

PR: https://github.com/foundation/foundation-rails/pull/298

OdairTrujillo commented 3 years ago

Just put $primary-color: null; at the top of the file. It will declare the $primary-color variable before being used by the global assignment.

asecondwill commented 1 year ago

Just put $primary-color: null;

but for loads of variables? isnt this something that should be fixed?