From 19bf4455f1d0d7f526a031cbce2ceb815d521347 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 4 May 2010 23:45:12 -0700 Subject: [PATCH] [Docs] The url helpers. --- .../content/reference/compass/helpers.haml | 3 ++ .../reference/compass/helpers/urls.haml | 44 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 doc-src/content/reference/compass/helpers/urls.haml diff --git a/doc-src/content/reference/compass/helpers.haml b/doc-src/content/reference/compass/helpers.haml index a037770d..9b926219 100644 --- a/doc-src/content/reference/compass/helpers.haml +++ b/doc-src/content/reference/compass/helpers.haml @@ -23,10 +23,13 @@ layout: core * [elements-of-type()](/docs/reference/compass/helpers/display/) * [enumerate()](/docs/reference/compass/helpers/selectors/#enumerate) * [font-files()](/docs/reference/compass/helpers/font-files/) + * [font-url()](/docs/reference/compass/helpers/urls/#stylesheet-url) * [headings()](/docs/reference/compass/helpers/selectors/#headings) * [image-width()](/docs/reference/compass/helpers/image-dimensions/#image-width) * [image-height()](/docs/reference/compass/helpers/image-dimensions/#image-height) + * [image-url()](/docs/reference/compass/helpers/urls/#image-url) * [inline-font-files()](/docs/reference/compass/helpers/inline-data/#inline-font-files) * [inline-image()](/docs/reference/compass/helpers/inline-data/#inline-image) * [nest()](/docs/reference/compass/helpers/selectors/#nest) + * [stylesheet-url()](/docs/reference/compass/helpers/urls/#stylesheet-url) diff --git a/doc-src/content/reference/compass/helpers/urls.haml b/doc-src/content/reference/compass/helpers/urls.haml new file mode 100644 index 00000000..69fb818e --- /dev/null +++ b/doc-src/content/reference/compass/helpers/urls.haml @@ -0,0 +1,44 @@ +--- +title: Compass URL Helpers +crumb: URLs +framework: compass +meta_description: Helper functions for working with URLs. +layout: core +classnames: + - reference + - core + - helpers +--- +%h1 Compass URL Helpers + +:markdown + These url helpers isolate your stylesheets from environmental differences. + They allow you to write the same stylesheets and use them locally without + a web server, and then change them to be using asset hosts in production. + + They might also insulate you against some code reorganization changes. + +#stylesheet-url.helper + %h3 + %a(href="#stylesheet-url") + stylesheet-url($path) + .details + %p + Generates a path to an asset found relative to the project's css directory. + +#font-url.helper + %h3 + %a(href="#font-url") + font-url($path) + .details + %p + Generates a path to an asset found relative to the project's font directory. + +#image-url.helper + %h3 + %a(href="#image-url") + image-url($path) + .details + %p + Generates a path to an asset found relative to the project's images directory. +