I have 5 colors and 1 mixin
:
@sec-blue: #29a1eb;
@sec-purple: #3b519f;
@sec-yellow: #ffda2e;
@sec-green: #83c99e;
@sec-brown: #cd9d76;
.bgcollighten(@col,@per){
@result: lighten(@col, @per);
}
and I want to use it on #section
, #subsection
and #mainelement
:
#section{
.bgcollighten(@sec-blue,0%);
background-color: @result;
}
#subsection{
.bgcollighten(@sec-blue,15%);
background-color: @result;
}
#mainelement{
.bgcollighten(@sec-blue,30%);
background-color: @result;
}
As you can see, the hard way of doing this will be I repeat it for 5 times with different colors. I found out that we can loop to generate class. But how to use it to loop a list of values?