Closed (fixed)
Project:
Data URI Sprites Generator
Version:
6.x-1.0-alpha1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2010 at 07:11 UTC
Updated:
3 Jul 2012 at 17:58 UTC
Have you looked at the CSS Embedded Images module?
Comments
Comment #1
dmitriy.trt commentedI've found that project too late, after creating this project and committing code to CVS. This is my fault.
I've tried to contact module's author about two weeks ago with no success, still no answer. So I've decided to release first alpha version. If jcarnett will answer to my letter and he'll agree to merge projects, we'll discuss it.
Comment #2
jcarnett commentedHi Dmitriy, sorry I didn't get back to you sooner -- I haven't had much free time lately and I wanted to actually familiarize myself with your module. We're definitely covering the same ground and I think it would be beneficial for us to merge projects. You've made more progress than I have on some of the features I had planned for the 2.0 release of CSS Embedded Images, specifically using conditional comments for IE, MHTML, separating the data URIs into their own stylesheet, and including a data URI only once for repeated images.
My main focus lately has been on dealing with the last point, including a data URI only once, but it tends to cause problems with complex themes because it changes the cascade order (as does separating the stylesheets), especially when dealing with IE's 32Kb limit. At first glance it doesn't appear you've solved that problem either, or maybe I missed it looking through the code.
One thing I think we could both benefit from is using a proper CSS parser instead of regular expressions. That, of course, is a challenge because of Drupal's strict contrib licensing requirements so there may not be a feasible alternative there.
Let me know how you'd like to proceed.
Comment #3
dmitriy.trt commentedHi Joshua! I think we should continue development of your module and integrate all missing features to it. This module should be closed, because it has much less users and is younger comparing to CSS Embedded Images. So, I can write a huge patch or become a co-maintainer of your module, at your choice.
About cascading problem... Maybe we could depend on CSS Tidy (or recommend it and other similar modules if they are exists) to have collapsed "background" and "list-style" properties, this would eliminate problems like this:
{background: url('img.png'); background: none;}Or we can just do it in our module: we'll have to parse all background and list-style properties and process cascading for the same selectors.
Also, I have "TODO" in my module to attach CSS with images right after aggregated CSS file, so not aggregated CSS files from theme still can override this images and we'll not break such themes.
Are there any other problems with cascading except this one? Overriding with more specific selector or with "!important" should still work fine.
You can contact me by email or contact form on this site, by the way.
Comment #4
philbar commentedAs the developer of CSSTidy, I wouldn't recommend depending on CSSTidy. To many other issues to worry about besides collapsing css properties.
Also, it might be overkill to try to strip down CSSTidy for this task.
I've created some issues over at CSS Embedded Images for these problems:
#875852: Issues with Overwriting CSS
#875858: Issues with Duplicate Images in CSS
Comment #5
dmitriy.trt commentedData URI Sprites Generator marked as abandoned now. Please, use CSS Embedded Images.
Comment #7
mgiffordAlso with a D7 version
http://drupal.org/project/spritesheets