Search code examples
cssspritecompass-sass

Compass - Get Individual number from sprite-position


I need to make retina images available. I will be using the same sprite generated, but I need to halve its height, width and background-position. I would like to know how can I obtain the separated units from sprite-position($icon-map, $icon-name) to get the units I need to halve them (as obtaining them like so sprite-position($icon-map, $icon-name) / 2 doesn't work ).


Solution

  • If I understand right, this mixin can help you: https://gist.github.com/thulstrup/2140082