[pmwiki-users] Problems with the embedded CSS in pmwiki.php

marc gmane at auxbuss.com
Wed Nov 1 13:15:11 CST 2006


Patrick R. Michaud said...

> Forgive me if I'm misreading things, but you seem to be approaching this
> from the perspective of "it would be better to have the core settings in
> a .css file instead of embedded styles".  I don't disagree, but that isn't
> the issue that started this thread, which is "how can a skin override
> the core settings and still allow an admin to override the skin's settings?"
> (Yes, you did say you entered the discussion in mid-thread.  :-)

... but only have one skin CSS file. I see that Hans is prepared to use 
two, but that's no good for me.
 
> If all we're doing is changing PmWiki's embedded styles into an
> external CSS, but not changing anything with respect to the other
> issue, I don't see that it's worth the hassle to existing sites to
> change this.  As noted above, skins can already move the core styles 
> into an external css without too much difficulty, and without needing to
> change PmWiki's existing defaults.

It's easy to do, but no fun at each PmWiki update.
 
> To support that, I don't see a major problem with including a 
> pub/css/pmwiki-core.css file in the distribution.  Then a skin
> can simply set $HTMLStylesFmt['pmwiki'] = '' in skin.php, and 
> the template can have:
> 
>     <link href='$FarmPubDirUrl/css/pmwiki-core.css' ... />
>     <link href='$SkinDirUrl/skin.css' ... />
>     <!--HTMLHeader-->

Not here. My current setup is 

    <link rel='stylesheet' type='text/css' href='$PubDirUrl/css/pmwiki- 
      core.css' />
    <!--HTMLHeader-->
    </head>

then

global $HTMLStylesFmt;
$HTMLStylesFmt['pmwiki']	= '';
$HTMLStylesFmt['diff']		= '';
$HTMLStylesFmt['simuledit'] = '';
$HTMLStylesFmt['markup']	= '';
$HTMLStylesFmt['urlapprove']= '';
$HTMLStylesFmt['vardoc']	= '';
$HTMLStylesFmt['wikistyles']= '';

global $HTMLHeaderFmt;
$HTMLHeaderFmt['skin'] = 
  "<link rel='stylesheet' type='text/css' 
     href='\$SkinDirUrl/skin.css' title='Skin'  />\n";

This allows a single skin CSS that can override recipe styles, if 
necessary, without resorting to pub/css/local.php or 
field/pub/css/local.php.

-- 
Best,
Marc





More information about the pmwiki-users mailing list