added boolean functions for finding selectors
This commit is contained in:
parent
46eec5362d
commit
6e1daf69f5
@ -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)
|
||||
|
||||
|
@ -71,6 +71,18 @@ module Compass
|
||||
@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
|
||||
|
0
spec/compass/sass_extensions/sprites/base_spec.rb
Normal file
0
spec/compass/sass_extensions/sprites/base_spec.rb
Normal file
BIN
spec/test_project/public/images/selectors/ten-by-ten.png
Normal file
BIN
spec/test_project/public/images/selectors/ten-by-ten.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
spec/test_project/public/images/selectors/ten-by-ten_active.png
Normal file
BIN
spec/test_project/public/images/selectors/ten-by-ten_active.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
spec/test_project/public/images/selectors/ten-by-ten_hover.png
Normal file
BIN
spec/test_project/public/images/selectors/ten-by-ten_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
spec/test_project/public/images/selectors/ten-by-ten_target.png
Normal file
BIN
spec/test_project/public/images/selectors/ten-by-ten_target.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue
Block a user