Assert that sprite offsets are numbers.
This commit is contained in:
parent
1b3e7a3a6b
commit
28daff6771
@ -120,6 +120,8 @@ module Compass::SassExtensions::Functions::Sprites
|
|||||||
#
|
#
|
||||||
# background-position: 3px -36px;
|
# background-position: 3px -36px;
|
||||||
def sprite_position(map, sprite = nil, offset_x = ZERO, offset_y = ZERO)
|
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)
|
sprite = convert_sprite_name(sprite)
|
||||||
verify_map(map, "sprite-position")
|
verify_map(map, "sprite-position")
|
||||||
unless sprite && sprite.is_a?(Sass::Script::String)
|
unless sprite && sprite.is_a?(Sass::Script::String)
|
||||||
|
Loading…
Reference in New Issue
Block a user