Hi all,

Just want to announce my auto_sprite gem which some of you may find handy..
It makes using CSS sprites painless.  As a bonus - should you remove it some
day, it doesn't break you app, it just reverts to <img> tags..

Full docs are at http://fargle.org/auto_sprite


In a pinch:


   1. Include the stylesheet in your layout:

        <%= stylesheet_link_tag "auto_sprite" %>

   2. Create a directory called sprites in your images directory (e.g.
   RAILS_ROOT/public/images/sprites)
   3. Put the images you want to link to in your public/images/sprites
   directory.
   4. Use your images like you normally would:

   <%= image_tag ‘sprites/logo.png’ %>
   <%= image_tag ‘sprites/icon1.jpg’ %>
   5. Reload you application and enjoy your now faster website.


Enjoy!
Stephen
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to