LESS CSS: Reuse generated .@{name} class as a mixin
问题 I'm using LESS CSS 1.3.3. Sorry if this question has already been asked, I didn't find anything relevant on the web. I have several class generators that look like this (example extremely simplified, just enough to trigger the error): #genMarginTop (@name, @size) { .@{name} { margin-top: @size; } } Then I use them to generate some actual classes: #genMarginTop(mtStandard, 40px); #genMarginTop(mtHalf, 20px); So far, so good, LESS correctly generates those classes and I can use them in the HTML