【问题标题】:Why doesn't :extend() compile with gulp-less?为什么 :extend() 不使用 gulp-less 编译?
【发布时间】:2015-09-06 12:53:17
【问题描述】:

我根据 LESS 文档创建了一个 :extend 表达式。但是 gulp-less 不能编译它。

这些表达有什么问题?

html
{
    &:extend(body);
}

body
{
    height: 100%;
}

html:extends(body)
{
}

body
{
    height: 100%;
}

【问题讨论】:

    标签: less gulp-less


    【解决方案1】:

    这可能是由于 gulp-less 版本过时

    尝试运行这个 NPM 命令:

    npm update gulp-less
    

    它将更新您的软件包并应包含所有最新功能。

    【讨论】:

    • 我已经更新了最新版本的 gulp-less 并且仍然 :extend 在嵌套范围内不起作用,但 php less 编译器会考虑到它。
    【解决方案2】:

    很遗憾,这是我打错了字。它不应该读取 extends

    可能这也是上版本无法正常工作的原因。虽然我在这里写得正确,但我可能在我的代码中拼错了。

    gulp-less forum on GitHub 那里得到了提示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-26
      • 2017-08-30
      • 2016-04-09
      • 1970-01-01
      • 1970-01-01
      • 2017-03-08
      相关资源
      最近更新 更多