Skip to content

Instantly share code, notes, and snippets.

View rubypirate's full-sized avatar
🏠
Working from home

Jamal rubypirate

🏠
Working from home
View GitHub Profile
@jiren
jiren / sprite_datauri_writer.rb
Created January 20, 2011 14:57
This generates 2 css files - sprite image and a css along with a datauri css.
#! /usr/local/bin/ruby -w
# This simple program takes a bunch of images and creates a sprite image along with the corrosponding
# css. It also generates the datauri css. So, we can serve performance optimized CSS depending on the
# Browsers.
#
# Browsers which do not support datauri, like IE7 and below get the sprite image and the sprite css.
# Browsers which support datauri, get the datauri.css
#
# Usage: