0

I'm trying to use use_percentages to generate an image sprite with background position by percentage. But after compiling the SCSS file, the background-position declaration is still in pixels.

My SASS code:

@import "compass/utilities/sprites";

$sprite-layout:smart;
$sprite-sprite-dimensions: true;
$use-percentages: true;

@import "images/sprite/*.png";
@include all-sprite-sprites;

How can I get the sprite images to be positioned by percentages?

KatieK
  • 13,586
  • 17
  • 76
  • 90
rtkbr
  • 3
  • 1

1 Answers1

0

You have to include the name of your sprite map in the variable when specifying the use-percentages parameter, as you have already done for layout. So just change $use-percentages: true; to $sprite-use-percentages: true;.

KatieK
  • 13,586
  • 17
  • 76
  • 90