Auto-generate LESS styles for sprite icons
问题 I have icon sprites image with each icon in a 20 by 20 pixel area. Each icon has several variants (black, colour, white small etc.). And have a significant amount of them. Instead of writing styles for each individual icon I'd rather just provide their names in my LESS file and let the processor generate styles for them. This is what I came up with but it doesn't seem to work. @icons: upvote,downvote,comment,new,notify,search,popup,eye,cross; @array: ~`(function(i){ return (i + "").replace(/[