【问题标题】:Rails 3.2.1 asset precompile error when using !important in .css在 .css 中使用 !important 时,Rails 3.2.1 资产预编译错误
【发布时间】:2015-01-13 14:55:36
【问题描述】:

当我在我的 Rails 应用程序上进行 rake assets:precompile 时,如果我有配置,它会失败

config.assets.compress = true  

导致错误的块是

.banner-row {
overflow: hidden;
margin: 0px; !important
padding: 0px; !important    
}

我得到的错误是

rake aborted!
Sass::SyntaxError: Invalid CSS after "margine: 0px; ":expected "}", was !important"

预编译任务通过 compress = false

【问题讨论】:

    标签: css ruby-on-rails sass


    【解决方案1】:

    试试这个:

    .banner-row {
    overflow: hidden;
    margin: 0px !important; 
    padding: 0px !important;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-14
      • 1970-01-01
      • 1970-01-01
      • 2017-04-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多