2

What is the correct way to mix a LESS variable in a class within LESS itself. I've tried it like this:

.btn-@juicer-popup-button-color();

and

.btn-@{juicer-popup-button-color}();

Both options don't seem to work... the outcome should be something like .btn-red(); Where red is stored in the variable @juicer-popup-button-color.

For example:

@juicer-button-color: red;

.juicer-button {
  font-weight: bold;
  .btn();
  .btn-lg();
  .btn-@juicer-button-color(); //this one
  text-decoration: underline !important;
  font-style: italic;
}

and the outcome should be

.juicer-button {
  font-weight: bold;
  .btn();
  .btn-lg();
  .btn-red(); //this one
  text-decoration: underline !important;
  font-style: italic;
}
Jonell
  • 95
  • 5
  • You mean append a variable's value in the selector? If yes, `.btn-@{juicer-popup-button-color}{ property: value; }`. – Harry Jun 30 '16 at 08:58
  • 1
    This [answer](http://stackoverflow.com/questions/19602812/less-mixin-a-variable-class-name) could help you. – Sigismund Jun 30 '16 at 09:24

0 Answers0