【问题标题】:Mixin animation takes 1 argument but 2 were passedMixin 动画需要 1 个参数,但传递了 2 个参数
【发布时间】:2016-11-14 05:47:52
【问题描述】:

我有下面的 sass 代码,

@include animation(swayb $speed ease infinite 3s, reset 1s ease forwards 5s);

如果我在我的 ubuntu 机器上使用 compass watch 观看它会引发错误,

(_includes/_common.scss 的第 2500 行:Mixin 动画需要 1 个参数 但有 2 个通过了。)

【问题讨论】:

  • 可能是您在动画函数中定义了 1 个参数,但在这里使用时您传递的参数超过 1 个,导致此错误。
  • 但是这段代码在其他机器上运行良好
  • 你能传递带有额外函数括号的参数,例如 +transition-duration((0.2s, 0.5s, 0.2s))。 github.com/Compass/compass/issues/575

标签: css animation sass


【解决方案1】:

我希望它会起作用。检查以下代码:-

@include 动画((swayb $speed ease 无限3s, reset 1s ease forward 5s));

参考 - https://github.com/sass/sass/issues/699

也请查看这篇文章

https://www.sitepoint.com/sass-multiple-arguments-lists-or-arglist/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-03
    • 1970-01-01
    • 1970-01-01
    • 2022-01-18
    • 1970-01-01
    • 2018-07-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多