less.js
less.js copied to clipboard
help | how to use(or possibility to) mixin with function?
in my case
first I use function to create a .in-10 ...
@selectors: 5, 10, 20;
each(@selectors, {
.in-@{value}{
padding: (@value)px;
}
});
then use .in-10 as a mixin to .button
.button{
.background-color: green;
.in-10(); /* <-- here to use mixin */
...some other
}
an error say .in-10 is undefined, may I think they are output same time so that .in-10 is not find, how can I make this work? how to code less in this case?
I can't got any answer in stackoverflow so I try here, pls help!
emmm, write seprate .in-5 / .in-10 / in-20 mixin.