Got my reversed motion backwards.

This commit is contained in:
Chris Eppstein 2010-12-19 17:51:40 -08:00
parent cb6f130217
commit df8eefa3c2
2 changed files with 5 additions and 5 deletions

View File

@ -331,7 +331,7 @@ module Compass::SassExtensions::Functions::Sprites
if offset_x.unit_str == "%"
x = offset_x # CE: Shouldn't this be a percentage of the total width?
else
x = offset_x.value + image[:left]
x = offset_x.value - image[:left]
x = Sass::Script::Number.new(x, x == 0 ? [] : ["px"])
end
y = offset_y.value - image[:top]

View File

@ -277,7 +277,7 @@ describe Compass::Sprites do
}
.adjusted-px-1 {
background-position: 14px 0;
background-position: -6px 0;
}
.adjusted-px-2 {
@ -315,7 +315,7 @@ describe Compass::Sprites do
}
.adjusted-px-1 {
background-position: 14px 0;
background-position: -6px 0;
}
.adjusted-px-2 {
@ -362,11 +362,11 @@ describe Compass::Sprites do
}
.squares-ten-by-ten {
background-position: 10px 0;
background-position: -10px 0;
}
.squares-twenty-by-twenty {
background-position: 10px -10px;
background-position: -10px -10px;
}
CSS
image_size('squares-*.png').should == [30, 30]