Created
November 2, 2011 20:35
-
-
Save nhunzaker/1334829 to your computer and use it in GitHub Desktop.
Compass with Sprites on Rails 3.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: | |
# Place this file within the config directory of your Rails 3.1 Application | |
########################################################################################## | |
# This configuration file works with both the Compass command line tool and within Rails. | |
# Require any additional compass plugins here. | |
project_type = :rails | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "app/assets/stylesheets" | |
sass_dir = "app/assets/stylesheets" | |
images_dir = "app/assets/images" | |
javascripts_dir = "app/assets/javascripts" | |
output_style = :compressed | |
# To enable relative paths to assets via compass helper functions. Uncomment: | |
relative_assets = true | |
line_comments = false | |
# If you prefer the indented syntax, you might want to regenerate this | |
# project again passing --syntax sass, or you can uncomment this: | |
# preferred_syntax = :sass | |
# and then run: | |
# sass-convert -R --from scss --to sass public/sass scss && rm -rf sass && mv scss sass | |
preferred_syntax = :scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The location of the images to compile | |
@import "icons/*.png"; | |
// Automagically creates classes for each sprite image | |
@include all-icons-sprites; | |
// Make a sprite! | |
span.tools { | |
@include icons-sprite(tools); | |
} |
No problem! It feels good to save someone else the angst!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!