From 4b75ef471e14ab43b29a6ea333d67cc12af89893 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 12 Sep 2010 15:39:19 -0700 Subject: [PATCH] This is a little more readable. --- lib/compass/sass_extensions/functions/sprites.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index 998a048a..914dfa00 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -1,5 +1,5 @@ module Compass::SassExtensions::Functions::Sprites - + include Compass::SassExtensions::Functions::ImageSize class SpriteInfo < Sass::Script::Literal attr_reader :sprite attr_reader :sprite_item @@ -153,7 +153,7 @@ private image[:margin_top] = margin_top if margin_top > image[:margin_top] image[:margin_bottom] = margin_bottom if margin_bottom > image[:margin_bottom] else - width, height = Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(file).size + width, height = ImageProperties.new(file).size x = (position_x and position_x.numerator_units == %w(%)) ? position_x : Sass::Script::Number.new(0) y = sprite[:height] + margin_top y = Sass::Script::Number.new(y, y == 0 ? [] : ['px'])