[Compass Core] Bug fix to sprites: fixed width and height assignments for x and y position variables

This commit is contained in:
Brandon Mathis 2009-07-17 18:25:18 -05:00 committed by Chris Eppstein
parent 7d47649248
commit 60ac9dba0e

View File

@ -4,8 +4,8 @@
// Simplest use: +sprite-img("icons-32.png", 1)
=sprite-img(!img, !col, !row = 1, !width = !sprite_image_default_width, !height = !sprite_image_default_height, !margin = !sprite_image_default_margin)
!x = ((!col - 1) * -!height) - ((!col - 1) * !margin)
!y = ((!row - 1) * -!width) - ((!row - 1) * !margin)
!x = ((!col - 1) * -!width) - ((!col - 1) * !margin)
!y = ((!row - 1) * -!height) - ((!row - 1) * !margin)
:background= image_url(!img) "no-repeat" !x !y
:width= !width
:height= !height