Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do you manage and version control CSS sprite?

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4424
253
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your website has so many small images you better keep bundle them into CSS sprite files. I am just scratching my head trying to figure out a best to manage and version control these generated sprite images. Let's say you had a small delete button and you already bundled it in a sprite file. Now you got a better image for the same button and you want to update your sprite. What practices do you follow to get this done? Ways I can think of are..

  • Use Photoshop to edit the whole sprite image and replace the previous button with the new one.
  • Regenerate your sprite with the tool you use to generate them.

  • What do you follow as a best practice? Anything other than the above two ways?
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64833
    86
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    For me it's all about Photoshop, baby!

    Coincidental timing: I've spent a lot of time this week in Photoshop, a lot of it creating and editing sprite sheets.

    With regards to version control, I keep the original layered PSD files in version control as well as checking in the exported PNGs.
     
    Devaka Cooray
    ExamLab Creator
    Marshal
    Pie
    Posts: 4424
    253
    Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Bear! I was always a tool-whiz and this made me realize I can no longer be
     
    Eric Pascarello
    author
    Rancher
    Posts: 15385
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Just because you change the image does not mean your users will also see the changes due to caching. To get around it, you would need to add a version querystring after the image to force a new version from the cache.

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic