compass
https://github.com/chriseppstein/compass
CSS
Compass is no longer actively maintained. Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.
Compass::SassExtensions::Functions::Sprites#sprite
Returns the image and background position for use in a single shorthand property:
$icons: sprite-map("icons/*.png"); // contains icons/new.png among others.
background: sprite($icons, new) no-repeat;
Becomes:
background: url('/images/icons.png?12345678') 0 -24px no-repeat;
If the `use_percentages` parameter is passed as true, percentages will be
used to position the sprite. Example output:
background: url('/images/icons.png?12345678') 0 50% no-repeat;Edit
git clone [email protected]:chriseppstein/compass.git
cd compass
open cli/lib/compass/sass_extensions/functions/sprites.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Compass--SassExtensions--Functions--Sprites-sprite-for-pr
# Commit to gitgit add cli/lib/compass/sass_extensions/functions/sprites.rbgit commit -m "better docs for Compass::SassExtensions::Functions::Sprites#sprite"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Compass--SassExtensions--Functions--Sprites-sprite-for-pr
hub pull-request
# Celebrate!