[pmwiki-users] css for just one wikigroup
marc
gmane at auxbuss.com
Sun Nov 5 13:05:56 CST 2006
Hans said...
> Sunday, November 5, 2006, 1:52:21 PM, marc wrote:
>
> > While you have already moved you skin CSS file, there is a way to
> > position it after the embedded styles (PmWiki and recipes), but before
> > the local customization CSS files pub/css/local.php, etc). To do so, add
> > the following to you skin.php:
>
> > global $HTMLHeaderFmt;
> > $HTMLHeaderFmt['skin'] = "<link rel='stylesheet' type='text/css'
> > href='\$SkinDirUrl/skin.css' />\n";
>
> > This is what I do, and it ensure that the skin template always overrides
> > PmWiki and recipe styles - the template always wins.
>
> I found out that not only does pub/css/local.css
> and pub/css/Group.css and pub/css/Group.Page.css
> load after the skin.css if it is loaded with HTMLHeaderFmt,
> but also a recipe can load HTML later via HTMLHeaderFmt,
> if it is called via a function-call from a markup directive.
> (I noticed DomTT does this).
> This is a bit surprising, but maybe it can be argued that it amounts
> to a local customisation, i.e. a directive on a specific wiki page.
I'd argue that a recipe that loads its CSS after local customisation is
broken. There's no reason to do it, after all. And it breaks the PmWiki
model, at least as I understand it.
Then again, if I wanted to use such a recipe, I'd fix it so that it was
better behaved. However, not everyone is in a position to do that, so I
think it should be avoided.
> I think it is quite smart if recipes restrict their style loading only
> to occur on pages it is needed, which may be just pages where the
> markup is placed.
This is one reason why I have custom versions of a lot of recipes.
> Still this type of loading appears late in the
> sequence, in fact later than the pub/css/ localisations.
> This could lead to undesired results, and may not be what an admin
> expects when she includes a recipe for general use in config.php.
I agree.
--
Best,
Marc
More information about the pmwiki-users
mailing list