, ...
$sprite-map: sprite-map("your_sprite_folder_here/*.png")
i
background: $sprite-map
display: inline-block
@each $icon in sprite_names($sprite-map)
.icn-
background-position: sprite-position($sprite-map, $icon)
+sprite-dimensions($sprite-map, $icon)
, 2 ... cats.png cats-hover.png
, ( )
<i class=".icn-cats"></i>
To add a hang ...
.icn-cats
&:hover
background-position: sprite-position($sprite-map, cats-hover)
I am pretty sure that there is a way to automatically generate a hang state, but I don't have much time to figure this out.
source
share