【问题标题】:Grunt SASS Invalid property name appearanceGrunt SASS 无效的属性名称外观
【发布时间】:2015-07-16 21:18:17
【问题描述】:

使用以下 SASS 代码时

.select select
    -webkit-appearance: none
       -moz-appearance: none
            appearance: none

通过 Grunt 编译时,我得到一个“无效的属性名称”。问题似乎与“-moz-appearance: none”有关。

我正在使用 Autoprefixer,但它不支持外观属性 (https://github.com/postcss/autoprefixer#why-doesnt-autoprefixer-support-appearance)。

编译时让行通过的最好方法是什么?

【问题讨论】:

  • 感谢web kit documentation 的值 'none' 不存在外观。您应该尝试使用正确的值。
  • Sass 不会抱怨无效的属性名称。
  • 放弃这种格式,sass 不喜欢它:)

标签: css sass gruntjs autoprefixer


【解决方案1】:

相当蹩脚,但它与缩进有关。必须是:

.select select
    -webkit-appearance: none
    -moz-appearance: none
    appearance: none

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-18
    • 1970-01-01
    • 2021-10-07
    • 1970-01-01
    • 2016-01-14
    相关资源
    最近更新 更多