Generate png sprite and css for directory of images
Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
script
src/spriter
test
.gitignore
README.markdown
epl-v10.html
project.clj

README.markdown

css-spriter

Improve page performance by combining image resources into a single browser request using css sprites. This tool, written in Clojure, will recursively concatenate all PNG images into a single sprite image, and generate the appropriate CSS styles to display those images correctly. Css-spriter allows either vertical or horizontal image layouts.

A List Apart has more information on css sprites.

Get Started

If you don't want to build, use this prebuilt css-spriter-standalone.jar and refer to the Usage section.

Building

requires leiningen

lein uberjar

Usage

java -jar css-spriter-standalone.jar [dir] [options]

Options

:layout [:vertical :horizontal] - how the sprite's images are arranged
:png [dest file path] - destination of generated png
:css [dest file path] - destination of generated css
:output [:compact :verbose] - format of css

Limitations

Only png files are supported.

License

Eclipse Public License 1.0