PDA

View Full Version : Appending CSS to additional.css


Disasterpiece
07-08-2011, 02:27 PM
What's the best way for a product to handle appending their own css?

If I add the additional.css to the plugin.xml file, does the old additional.css file get overwritten?

How can I make it that it's the easiest for the user?

vbresults
07-08-2011, 02:58 PM
If you create a product with a template that overwrites an existing template, it will work fine, BUT, if you remove the product it will DELETE the additional.css template, not bring back the default one. Beware of this! The only way to fix this problem after removing the product is to import the default style.

You can either use the headinclude_css template hook or add another template to be loaded by css.php. Both will require a plugin.