Using undefined number of arguments in mixins

前端 未结 2 1225
醉酒成梦
醉酒成梦 2020-12-12 00:39

I currently have -webkit specific attributes in my Less CSS sheet, I am trying to update them with mixins to add -moz attributes, like

2条回答
  •  情话喂你
    2020-12-12 01:00

    You could try

    .transition(@1) {
        -webkit-transition: @1;
        -moz-transition: @1;
    }
    .transition-2(@1, @2) {
        .transition(@1); // this includes all the stuff from transition(@1)
        color:red; // additional stuff
    }
    

    As for your actual question, I dont believe that LESS itself has any sort of "rest" style arguments passing.

提交回复
热议问题