Module: Compass::SassExtensions::Functions::ImageSize
- Included in:
- Sass::Script::Functions
- Defined in:
- lib/compass/sass_extensions/functions/image_size.rb
Defined Under Namespace
Classes: ImageProperties
Instance Method Summary (collapse)
-
- (Object) image_height(image_file)
Returns the height of the image relative to the images directory.
-
- (Object) image_width(image_file)
Returns the width of the image relative to the images directory.
Instance Method Details
- (Object) image_height(image_file)
Returns the height of the image relative to the images directory
9 10 11 12 |
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 9 def image_height(image_file) _, height = image_dimensions(image_file) Sass::Script::Number.new(height, ["px"]) end |
- (Object) image_width(image_file)
Returns the width of the image relative to the images directory
3 4 5 6 |
# File 'lib/compass/sass_extensions/functions/image_size.rb', line 3 def image_width(image_file) width, _ = image_dimensions(image_file) Sass::Script::Number.new(width,["px"]) end |