Skip to content

Commit

Permalink
Adding ability to override offset values for images (eg 100%)
Browse files Browse the repository at this point in the history
  • Loading branch information
amikula committed Mar 15, 2010
1 parent 4cd0514 commit 6e1f57c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/sprite/sass_extensions.rb
Expand Up @@ -35,8 +35,10 @@ def sprite_url(group)
"url('#{sprite_image(group)}')"
end

def sprite_offset(*args)
"#{sprite_x_offset(*args)} #{sprite_y_offset(*args)}"
def sprite_offset(group, image, x=nil, y=nil)
x ||= sprite_x_offset(group, image)
y ||= sprite_y_offset(group, image)
"#{x} #{y}"
end

protected
Expand Down

0 comments on commit 6e1f57c

Please sign in to comment.