File: inline-data.haml

package info (click to toggle)
ruby-compass 0.12.2~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,308 kB
  • sloc: ruby: 10,474; makefile: 42; xml: 14
file content (38 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- 
title: Compass Inline Data Helpers
crumb: Inline Data
framework: compass
meta_description: Helper functions for embedding inline data.
layout: core
classnames:
  - reference
  - core
  - helpers
documented_functions:
  - "inline-image"
  - "inline-font-files"
---
%h1 Compass Inline Data Helpers

#inline-image.helper
  %h3
    %a(href="#inline-image")
      inline-image(<span class="arg">$image</span>, <span class="arg" data-default-value="inferred">$mime-type</span>)
  .details
    %p
      Embeds the contents of an image directly inside your stylesheet,
      eliminating the need for another HTTP request. For small images,
      this can be a performance benefit at the cost of a larger
      generated CSS file.
    %p
      Like the <a href="#"><code>image-url()</code></a> helper, the path
      specified should be relative to your project's images directory.

#inline-font-files.helper
  %h3
    %a(href="#inline-font-files")
      inline-font-files([<span class="arg">$font</span>, <span class="arg">$format</span>]*)
  .details
    %p
      Like the <a href="/reference/compass/helpers/font-files/"><code>font-files()</code></a> helper, but the font
      file is embedded within the generated CSS file.