【问题标题】:Keep running into asset precompile error in my css...not sure why在我的 css 中不断遇到资产预编译错误...不知道为什么
【发布时间】:2013-04-30 18:37:30
【问题描述】:

我在预编译资产时不断收到类似的错误:

Invalid CSS after "...margin-left:1px": expected "{", was ";line-height:16..."

所以我在 css 中发现了一个错误,即“1margin-left:1px”...所以我修复了它。现在我遇到了另一个 CSS 错误:

Invalid CSS after "...ced2>li{margin:": expected expression (e.g. 1px, bold), was "!inherit}.item-..."

但我看不出这段代码有什么问题...这里是完整的(我想就是这样):

.item-list.spaced>li,.item-list.spaced2>li{margin:!inherit}.item-list>li.item-orange{border-left-color:#eccb71}

我不确定这里的问题是什么。有人知道吗?

【问题讨论】:

    标签: ruby-on-rails ruby asset-pipeline precompile


    【解决方案1】:

    !inherit 是无效值。可能你想写inherit !important

    【讨论】:

    • 我从别人那里购买了一个主题,所以这就是它附带的...不知道那是无效的。让我试试看。
    【解决方案2】:

    你可以试试这个:

    item-list.spaced>li, .item-list.spaced2>li {
        margin: inherit;
    }
    .item-list>li.item-orange {
        border-left-color: #eccb71;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-03-19
      • 1970-01-01
      • 1970-01-01
      • 2014-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-30
      相关资源
      最近更新 更多