Can't reuse generated .@{name} classes as mixins
Hi,
I'm using LESS 1.3.3
When I generate classes like this:
#genMarginTop (@name, @size) {
.@{name} { margin-top: @size; }
}
#genMarginTop(mtStandard, 60);
Then I can't reuse them as mixins even though they are perfectly usable in HTML:
.someClass { .mtStandard; /* more stuff */ }
It gives a NameError: .mtStandard is undefined
Sure I can work around that using a different generator:
#genMarginTop (@size) {
margin-top: @size;
}
.mtStandard { #genMarginTop(60); }
.someClass { .mtStandard; /* more stuff */ }
But somehow this syntax feels clumsy, I'd rather generate the class directly using the @{name} syntax in the generator.
The problem seems to be that LESS doesn't register such generated classes in its "internal list" of available classes. It would be very nice if LESS could somehow "backtrack" those generated classes in order to be able to reuse them.
Thanks, and keep up the good work!
duplicate, see #1196
p.s. thanks for the thanks!
Sorry for the duplicate, even though I saw #1196 in the list I didn't understand just from its title that it was related. I'll watch that thread instead. Thanks again, for your reactivity in addition to all the rest. ;)