Reputation: 2891
How can I include a variable when setting a property value with less css. For example:
I want to set the background image on the right or on the left based on the variable @direction
.
I've tried:
@direction:left;
background: url(../../images/downarrow_blue.png) no-repeat @direction white;
but it does not work.
Upvotes: 0
Views: 178
Reputation: 29231
You have 2 issues:
@direction: 'left';
.@direction: 'left top';
or @direction: 'right bottom';
.Check the documentation related to variables: http://lesscss.org/#-variables
Upvotes: 1