Multiple properties are getting treated as separate arguments in mixins

后端 未结 4 1629
北海茫月
北海茫月 2020-12-03 05:31

I\'m trying to write a mixin, but I can\'t seem to get the arguments working the way I want: multiple properties are getting treated each as a separate argument.

Cu

4条回答
  •  被撕碎了的回忆
    2020-12-03 06:09

    If you want to pass a comma-separated list as an argument to mixin, you can simply use a semicolon to separate arguments.

    Code below works as desired with the mixin you defined:

    a {
        .transition(color, opacity; .5s);
    }
    

提交回复
热议问题