2

Is it already possible to do something like this in LESS:

SASS:

$theme: a

.myselector-#{$theme}
  padding: 3px

This would evaluate in

.myselector-a
{
  padding: 3px;
}
mark_dj
  • 984
  • 11
  • 29
  • It is now possible. This is an old question and has been re-answered here - http://stackoverflow.com/questions/10280567/how-to-set-the-css-class-name-dynamically-in-lesscss – Luke Page Apr 25 '12 at 11:07

1 Answers1

1

I'm afraid that this kind of feature is not supported yet...

I've just searched for it looking at LESS test files available on github (https://github.com/cloudhead/less.js/tree/master/test/less) and didn't find such functionality.

croogie
  • 158
  • 6