[wp-hackers] Adding A CSS Loader

Jamie Holly hovercrafter at earthlink.net
Tue Apr 24 19:24:49 GMT 2007


> 
> Writing a static file is certainly good, but I have some questions:
> a) What about themes that (want to) include different stylesheets
> depending on what is displayed? (e.g. a completely different stylesheet
> for archives)

Nothing would prevent that. All they would have to do is use the current method of directly outputting the CSS reference in their template instead of whatever the new function would be (add_css?). I would also recommend going the Drupal route on this issue of having an option where people can just disable the feature all together in case there is some weird plugin combination causing an issue.

> b) What if a plugin (wants to) include(s) a stylesheet depending on
> <younameit>? (weekday, theme selector on the page, ...)

Basically that would be the same as above. You still have the option of using the add_action for the wp_head call instead of the proposed CSS loader.

> c) Will there be an option for plugin/theme developers to switch to a
> on-the-fly-generation so they can alter any css file (in there favorite
> editor) and get the new css on next page load? I would not want to have
> to wait x minutes, do y reloads or press a button every time I make a
> change to a css file during development.
> 
> Greetings,
> lino.
> 
> 
Sure - just disable the feature while changing things (same applies to wp_cache right now if people are changing templates around). I would also like to see a css_cache_flush function in there that can be triggered via different actions (press a 'clear cache' button in the admin panel, plugin activation/deactivation, editing of the theme files, etc.).

Jamie Holly
http://www.intoxination.net



More information about the wp-hackers mailing list