Skip to content

Instantly share code, notes, and snippets.

@positlabs
Last active December 17, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save positlabs/5555492 to your computer and use it in GitHub Desktop.
Save positlabs/5555492 to your computer and use it in GitHub Desktop.
scalable sprite sheet
.stitches-icon(@x: 0, @y: 0) {
@origUnit: 200px;
@xUnits: 8;
@yUnits: 7;
@width: 1632px;
@height: 1428px;
@pWidth: @width - @origUnit;
@pHeight: @height - @origUnit;
background-size: percentage(@xUnits) percentage(@yUnits);
background-position: percentage(-@x / @pWidth) percentage(-@y / @pHeight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment