Module: Compass::Core::SassExtensions::Functions::FontFiles
- Included in:
- Sass::Script::Functions
- Defined in:
- lib/compass/core/sass_extensions/functions/font_files.rb
Constant Summary collapse
- FONT_TYPES =
{ :woff => 'woff', :woff2 => 'woff2', :otf => 'opentype', :opentype => 'opentype', :ttf => 'truetype', :truetype => 'truetype', :svg => 'svg', :eot => 'embedded-opentype' }
Instance Method Summary collapse
Instance Method Details
#font_files(*args) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/compass/core/sass_extensions/functions/font_files.rb', line 21 def font_files(*args) return null unless args.any? files = [] with_each_font_file(*args) do |path, type| files << list(font_url(path), identifier("format('#{type}')"), :space) end list(files, :comma) end |
#font_formats(*args) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/compass/core/sass_extensions/functions/font_files.rb', line 13 def font_formats(*args) formats = [] with_each_font_file(*args) do |path, type| formats << identifier(type) end return list(formats, :comma) end |