【问题标题】:Running "compass watch" in Foundation 5 returns deprecation warnings在 Foundation 5 中运行“compass watch”会返回弃用警告
【发布时间】:2015-04-28 14:31:46
【问题描述】:

运行 grunt 指南针手表会给我弃用警告。

以下是我终端中的错误日志:

Running "watch" task
Waiting...
>> File "source/sass/layout/_navigation.scss" changed.
Running "compass:dist" (compass) task
DEPRECATION WARNING on line 275 of /Users/username/Sites/sitename/www/projectname/bower_components/foundation/scss/foundation/components/_global.scss:
    Assigning to global variable "$default-float" by default is deprecated.
    In future versions of Sass, this will create a new local variable.
    If you want to assign to the global variable, use "$default-float: left !global" instead.
    Note that this will be incompatible with Sass 3.2.

    DEPRECATION WARNING on line 276 of /Users/username/Sites/sitename/www/projectname/bower_components/foundation/scss/foundation/components/_global.scss:
    Assigning to global variable "$opposite-direction" by default is deprecated.
    In future versions of Sass, this will create a new local variable.
    If you want to assign to the global variable, use "$opposite-direction: right !global" instead.
    Note that this will be incompatible with Sass 3.2.

    DEPRECATION WARNING: The return value of index() will change from "false" to
    "null" in future versions of Sass. For compatibility, avoid using "== false" on
    the return value. For example, instead of "@if index(...) == false", just write
    "@if not index(...)".
            on line  of /Users/username/Sites/sitename/www/projectname/bower_components/foundation/scss/foundation/_functions.scss, in `exports'
            from line 342 of /Users/username/Sites/sitename/www/projectname/bower_components/foundation/scss/foundation/components/_global.scss
            from line 5 of /Users/username/Sites/sitename/www/projectname/bower_components/foundation/scss/foundation/components/_grid.scss
            from line 103 of /Users/username/Sites/sitename/www/projectname/source/sass/style.scss
        write development/includes/css/mercutio.css (2.757s)

    Done, without errors.

这是否意味着我必须更新某个 npm 包或者这是在基础框架中?


编辑:顺便运行 compass v1.0.1:

→ compass -v
Compass 1.0.1 (Polaris)
Copyright (c) 2008-2015 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

【问题讨论】:

    标签: gruntjs watch compass zurb-foundation-5


    【解决方案1】:

    发现问题。看来我的sass已经过时了。使用 3.3 (Maptastic Maple),应该使用 3.4 (Selective Steve)。

    运行

    $ sass -v

    找出你的版本是什么。如果它早于 3.4 运行

    $ sudo gem install sass

    安装新版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-06
      • 2014-04-28
      • 2021-01-22
      • 2016-12-03
      相关资源
      最近更新 更多