Module: SenchaTouch::SassExtensions::Functions::ThemeImages

Included in:
Sass::Script::Functions
Defined in:
lib/theme_images.rb

Instance Method Summary collapse

Instance Method Details

#theme_image(theme, path, mime_type = nil) ⇒ Object



5
6
7
8
9
10
# File 'lib/theme_images.rb', line 5

def theme_image(theme, path, mime_type = nil)
  path = path.value
  images_path = File.join(File.expand_path('../../',__FILE__), "vendor/assets", "images", theme.value || "default")
  real_path = File.join(images_path, path)
  inline_image_string(data(real_path), compute_mime_type(path, mime_type))
end