[dokuwiki] Re: CSS Dispatcher

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 9 Nov 2005 22:10:04 +0100

On Wed, 09 Nov 2005 00:03:39 +0100
Anika Henke <a.c.henke@xxxxxxxx> wrote:

> > Good idea. I thought about adding support for a style.css file
> > anyway to  keep templates more similar to the plugins.
> 
> Wouldn't it be better and more flexible to have a template-function
> that  can be used in main.php, etc. that passes on each needed css
> file  (individually per template)?
> I don't like the idea to be restricted to these few css filenames.
> (I am sure, I am not the only one who has named them differently and 
> splitted them up, trying to reorganize them and add more structure
> ...)

Any suggestions on how this should look like? I thought my self about
adding the names of the stylesheets into the style.ini file. Something
like:

[stylesheets]

layout.css = screen
design.css = screen
print.css  = print

[replacements]

__background__ == #fff

Your suggestion of using a template function has the charm of being able
to selectively choose different stylesheets in different php templates
instead of always loading everything. But I guess the call could look
somewhat messy with multiple stylesheets.

Andi

Other related posts: