Ctools has a useful framework for on-demand CSS generation, I think that this module should leverage it. At the moment this module requires an administrator to go to the settings form and submit before the new CSS file is generated. This means that it can be quite hard to update sites using this module, as there is an extra step after updating the variable by some other means.

If this module used the ctools CSS generation stuff, then you could build the CSS file on the fly (if needed) and thus if the contents of the variable (or hooks) changed, then the new CSS would automatically be generated. Because this would have a negative impact on performance, maybe storing the file-path or similar in the general cache table would be a good idea, so on a general cache wipe the CSS would possibly be re-generated.

CommentFileSizeAuthor
#4 css3pie-1361328-ctools-css.patch3.16 KBsteven jones

Comments

iler’s picture

Have to take look at this one but as you said it needs to be cached or something similar.

iler’s picture

Status: Active » Needs review

This is now implemented in the 7.x-2.x-dev branch. So when the cache gets cleared it will also trigger the regeneration of this css file. The css file is changed to use ctools css cache instead of files/css3pie/css3pie.css.

iler’s picture

And because of this ctools module is now also required for css3pie module to work.

steven jones’s picture

StatusFileSize
new3.16 KB

We can actually go further and remove the hook_init (a great thing) and allow the CSS to be built on demand rather than trying to pre-empt needing it.

Attached is a patch that does the following:

Removes the hook init.
Changes _css3pie_build_css3pie_css to only build the CSS if really needed.

iler’s picture

Status: Needs review » Fixed

Thanks for the improvements. Patch is now applied to the 7.x-2.x-dev branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.