Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/css_sprite/sprite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,19 @@ def dest_css_path(directory)
def dest_sass_path(directory)
File.join(@stylesheet_path, 'sass', File.basename(directory) + '.sass')
end

def partial?
(@config['partial'] == true) || (@stylesheet_path.end_with? 'partials')
end

# destination scss file path
def dest_scss_path(directory)
File.join(@stylesheet_path, File.basename(directory) + '.scss')
f = ''
f << '_' if partial?
f << File.basename(directory) + '.scss'
File.join(@stylesheet_path, f)
end

# append src_image to the dest_image with position (x, y)
def composite_images(dest_image, src_image, x, y)
width = [src_image.columns + x, dest_image.columns].max
Expand Down