Processed CSS is supposed to be succinct right?
I'm trying to build a button icon library using <span class="icon-login">
In this class I assign it a url based upon the class name. My less code mixin is:
.icon-finder(@url){
background-image: url("..images/icons/backend/@{url}-icon-36.png");
background-position: center center;
}
The @url
parameter fetches the icon name in my assets. However in order to use this mixin I need to create LOADS of instances.
.icon-analytics{
.icon-finder(analytics);
}
.icon-logout{
.icon-finder(logout); // Pointing to logout.png
}
etc etc
And this seems like a waste of time. Is there any way I can simplify this process? Because I'd love to have a compact little 'icon assigner' to each class. Thanks!