lib/sprite/styles/sass_mixin_generator.rb in sprite-0.2.2 vs lib/sprite/styles/sass_mixin_generator.rb in sprite-0.2.4
- old
+ new
@@ -7,21 +7,16 @@
end
def write(path, sprite_files)
# write the sass mixins to disk
File.open(File.join(Sprite.root, path), 'w') do |f|
- add_else = false
f.puts "= sprite($group_name, $image_name, $offset: 0)"
sprite_files.each do |sprite_file, sprites|
background_url = @builder.background_url(sprite_file)
sprites.each do |sprite|
f << " @"
- if add_else
- f << "else "
- end
- add_else = true
#{sprite[:x]}px #{sprite[:y]}px
if sprite[:align] == 'horizontal'
background_offset = "\#{#{sprite[:x]}+$offset}px #{sprite[:y]}px"
else
@@ -41,6 +36,6 @@
"sass"
end
end
end
-end
\ No newline at end of file
+end