Assert that sprite offsets are numbers.

This commit is contained in:
Chris Eppstein 2011-09-19 17:59:37 -07:00
parent 1b3e7a3a6b
commit 28daff6771

View File

@ -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)