From 28daff67713afa432ce300dfeb22f8b2aee8d7b9 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 19 Sep 2011 17:59:37 -0700 Subject: [PATCH] Assert that sprite offsets are numbers. --- lib/compass/sass_extensions/functions/sprites.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index da193f8e..e6506a66 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -120,6 +120,8 @@ module Compass::SassExtensions::Functions::Sprites # # background-position: 3px -36px; def sprite_position(map, sprite = nil, offset_x = ZERO, offset_y = ZERO) + assert_type offset_x, :Number + assert_type offset_y, :Number sprite = convert_sprite_name(sprite) verify_map(map, "sprite-position") unless sprite && sprite.is_a?(Sass::Script::String)