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;

Source | Google | Stack overflow

Edit

git clone [email protected]:chriseppstein/compass.git

cd compass

open cli/lib/compass/sass_extensions/functions/sprites.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Compass--SassExtensions--Functions--Sprites-sprite-for-pr


# Commit to git

git add cli/lib/compass/sass_extensions/functions/sprites.rbgit commit -m "better docs for Compass::SassExtensions::Functions::Sprites#sprite"


# Open pull request

gem 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!