chriseppstein/compass — Issue #674: Retrieving Specific Background Position (x/y)
Author: dannyx0
Created: 2012-01-13 01:22:54+00:00
State: open

According to the documentation it's possible to retrieve the background position of a sprite like so:

$icons: sprite-map("icons/*.png");
background-position: sprite-position($icons, new);
// background-position: 0 -34px;

It would be great to be able to specify which position to retrieve because some browsers lack support for `background-position-x` and `background-position-y`.

This could look like:

$icons: sprite-map("icons/*.png");
background-position: sprite-position-x($icons, new) center;
// background-position: 0 center;

or

$icons: sprite-map("icons/*.png");
background-position: center sprite-position-y($icons, new);
// background-position: center -34px;