Class: DynamicAssets::StylesheetReference

Inherits:
Reference show all
Defined in:
lib/dynamic_assets/reference/stylesheet_reference.rb

Constant Summary collapse

RELATIVE_URL_ROOT =

CSS style sheets can contain relative urls like this:

background: url(something.png)

The browser will look for the resource in the same location as the CSS file. However, we serve static resources like images from a different location, so the StylesheetReference will prepend RELATIVE_URL_ROOT to each such relative url in a stylesheet.

"/stylesheets"

Instance Attribute Summary

Attributes inherited from Reference

#name

Instance Method Summary collapse

Methods inherited from Reference

#content, #initialize, #member_names, #member_names=, #member_root, #minify, new_for_type, #paths, #signature

Constructor Details

This class inherits a constructor from DynamicAssets::Reference

Instance Method Details

#formatsObject



19
20
21
# File 'lib/dynamic_assets/reference/stylesheet_reference.rb', line 19

def formats
  %w(sass scss css)
end

#typeObject



23
24
25
# File 'lib/dynamic_assets/reference/stylesheet_reference.rb', line 23

def type
  :stylesheets
end