[pmwiki-users] css for just one wikigroup

Hans design5 at softflow.co.uk
Sun Nov 5 08:42:24 CST 2006


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 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. 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.

Maybe this comment should have gone to the previous thread of
"Problems with the embedded CSS in pmwiki.php".

Hans





More information about the pmwiki-users mailing list