I'm sure this is an easy one, but I can't get this to work. Essentially I am building a style guide to make work with designer/developer a bit easier. What I am trying to accomplish is this,
I have a pallet full of blocks, whose background color is generated on the fly by LESS using mixins. I'd like to be able to output the value which was generated by the mixin, and append it to the objects using the CSS pseudo element before.
Here is my code:
@defaultPrimaryColor : #f00;
#block1{ background-color: darken( @defaultPrimaryColor, 20%); } //should output #990000;
#block1:before{
@color : darken(@defaultPrimaryColor, 20%);
content: e(%("%s"),@color); // doesn't work
content: @color; // doesn't work
}
Any suggestions would be greatly appreciated. I looked on the website, but was unable to find a solution.
Thanks!