From 023d17645323540b38b73123d032faa7166f5365 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 3 May 2010 21:25:43 -0700 Subject: [PATCH] [Docs] Document the font-files() helper function. --- .../content/reference/compass/helpers.haml | 5 +-- .../reference/compass/helpers/font-files.haml | 35 +++++++++++++++++++ .../sass_extensions/functions/font_files.rb | 1 - 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 doc-src/content/reference/compass/helpers/font-files.haml diff --git a/doc-src/content/reference/compass/helpers.haml b/doc-src/content/reference/compass/helpers.haml index 6087712e..1392f860 100644 --- a/doc-src/content/reference/compass/helpers.haml +++ b/doc-src/content/reference/compass/helpers.haml @@ -17,5 +17,6 @@ layout: core All Helpers: - * [elements-of-type](/docs/reference/compass/helpers/display/) - * [enumerate](/docs/reference/compass/helpers/enumerate/) + * [elements-of-type()](/docs/reference/compass/helpers/display/) + * [enumerate()](/docs/reference/compass/helpers/enumerate/) + * [font-files()](/docs/reference/compass/helpers/font-files/) diff --git a/doc-src/content/reference/compass/helpers/font-files.haml b/doc-src/content/reference/compass/helpers/font-files.haml new file mode 100644 index 00000000..5e61b39b --- /dev/null +++ b/doc-src/content/reference/compass/helpers/font-files.haml @@ -0,0 +1,35 @@ +--- +title: Compass Font Files Helper +crumb: Font Files +framework: compass +meta_description: Helper function for listing fonts. +layout: core +classnames: + - reference + - core + - helpers +--- +%h1 Compass Font Files Helper + +#font-files.helper + %h3 + %a(href="#font-files") + font-files([$font, $format]*) + .details + %p + The font-files function takes any even number of arguments. + For each pair of arguments, the first is the path to the font file + relative to your project's font directory and the second is the format of + that font. + %p + This helper is used with the font-face mixin + and is what makes it possible to pass any number of font files. + %p + W3C Reference + .examples + %h4 Examples + %ul + %li + %a(href="/docs/examples/compass/css3/font-face/") Font-face Example + + diff --git a/lib/compass/sass_extensions/functions/font_files.rb b/lib/compass/sass_extensions/functions/font_files.rb index 079e2a10..c18ce05a 100644 --- a/lib/compass/sass_extensions/functions/font_files.rb +++ b/lib/compass/sass_extensions/functions/font_files.rb @@ -7,5 +7,4 @@ module Compass::SassExtensions::Functions::FontFiles end Sass::Script::String.new(files.join(", ")) end - end