Can I define a LESS mixin to generate a transition-property with a variable number of parameters?

前端 未结 4 1071
自闭症患者
自闭症患者 2020-12-14 19:40

I\'m introducing LESS to a large web app project to simplify my CSS. I\'ve got a few CSS rules which apply transitions to a varying number of properties, for example:

4条回答
  •  时光取名叫无心
    2020-12-14 20:17

    From less.js 1.3 onwards you have to specify ... in the argument list to signify that more arguments can be added. e.g.

    .transition-property(...) {
     foo: @arguments;
    }
    

提交回复
热议问题