Answer the question
In order to leave comments, you need to log in
How to set the class name of a sprite in compass?
Hello.
I generate sprites using compass:
$icons-sprite-base-class: ".icon";
$icons-spacing: 5px;
$icons-sprite-dimensions: true;
$icons-layout: smart;
@import "icons/*.png";
@include all-icons-sprites;
Answer the question
In order to leave comments, you need to log in
You can use this notation for a sprite:
And call it in the right place like this:
.icons { background: sprite($icons, icon-name) no-repeat; }
.icons.facebook { @include sprite($icons, icon-facebook); }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question