【问题标题】:What is the POSTCSS equivalent for the Ampersand(&) commonly used in LESS, SASS and STYLUS?LESS、SASS 和 STYLUS 中常用的 & 符号的 POSTCSS 等效项是什么?
【发布时间】:2016-12-14 21:44:52
【问题描述】:

所以我可以用更少的东西来& 做一个组合。

例如:

.baa {
  &.foo {
    opacity: 1;
  }
}

这将生成一个规则.baa.foo

为了让 postcss 做同样的事情,我们需要什么插件和语法?

【问题讨论】:

    标签: sass less postcss


    【解决方案1】:

    为了后代,

    我们需要这个 postcss 插件:

    https://github.com/postcss/postcss-nested

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-02-28
      • 1970-01-01
      • 1970-01-01
      • 2013-10-03
      • 2013-07-22
      • 2012-02-10
      • 2018-08-30
      相关资源
      最近更新 更多