added boolean functions for finding selectors

This commit is contained in:
Scott Davis 2011-03-21 22:10:44 -04:00
parent 46eec5362d
commit 6e1daf69f5
8 changed files with 15 additions and 3 deletions

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
compass (0.11.beta.3.a9b6d8c)
compass (0.11.beta.3.46eec53)
chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249)

View File

@ -70,7 +70,19 @@ module Compass
def image_for(name)
@images.detect { |img| img.name == name}
end
def has_hover?(name)
!image_for("#{name}_hover").nil?
end
def has_target?(name)
!image_for("#{name}_target").nil?
end
def has_active?(name)
!image_for("#{name}_active").nil?
end
def sprite_names
image_names.map{|f| Compass::Sprites.sprite_name(f) }
end

View File

@ -54,7 +54,7 @@ module Compass
def mtime
File.mtime(file)
end
private
def dimensions
@dimensions ||= Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(file).size

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB