fixed typo via #634
This commit is contained in:
parent
ac0136981a
commit
70ee152f79
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
compass (0.12.alpha.2.aab827f)
|
compass (0.12.alpha.2.701c8d3)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
fssm (>= 0.2.7)
|
fssm (>= 0.2.7)
|
||||||
sass (~> 3.1)
|
sass (~> 3.1)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
module Compass::SassExtensions::Functions::ImageSize
|
module Compass::SassExtensions::Functions::ImageSize
|
||||||
# Returns the width of the image relative to the images directory
|
# Returns the width of the image relative to the images directory
|
||||||
def image_width(image_file)
|
def image_width(image_file)
|
||||||
width, _ = image_demensions(image_file)
|
width, _ = image_dimensions(image_file)
|
||||||
Sass::Script::Number.new(width,["px"])
|
Sass::Script::Number.new(width,["px"])
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the height of the image relative to the images directory
|
# Returns the height of the image relative to the images directory
|
||||||
def image_height(image_file)
|
def image_height(image_file)
|
||||||
_, height = image_demensions(image_file)
|
_, height = image_dimensions(image_file)
|
||||||
Sass::Script::Number.new(height, ["px"])
|
Sass::Script::Number.new(height, ["px"])
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ module Compass::SassExtensions::Functions::ImageSize
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def image_demensions(image_file)
|
def image_dimensions(image_file)
|
||||||
options[:compass] ||= {}
|
options[:compass] ||= {}
|
||||||
options[:compass][:image_dimensions] ||= {}
|
options[:compass][:image_dimensions] ||= {}
|
||||||
options[:compass][:image_dimensions][image_file.value] = ImageProperties.new(image_path_for_size(image_file.value)).size
|
options[:compass][:image_dimensions][image_file.value] = ImageProperties.new(image_path_for_size(image_file.value)).size
|
||||||
|
Loading…
Reference in New Issue
Block a user