[pmwiki-users] css for just one wikigroup
marc
gmane at auxbuss.com
Sun Nov 5 07:52:21 CST 2006
Tegan Dowling said...
> On 11/3/06, Hans <design5 at softflow.co.uk> wrote:
> > Friday, November 3, 2006, 4:03:30 PM, Tegan wrote:
> >
> > > I tried just putting the Advocacy-unique css rules into the
> > > Advocacy.php file, and that didn't work.
> >
> > > What's the right thing?
> >
> > Create a css file with your custom css settings in pub/css/
> > with the name of your group, i.e.Advocacy.css
> > PmWiki loads this css file last after all other HTMLHeader stuff,
> > and hopefully after your skin css stuff.
>
> Thanks, Hans, Marc and Stirling -- Hans's mention of the HTMLHeader
> reminded me that I had never checked, after reading an earlier
> thread, to see if I had the css called for before or after HTMLHeader
> in the .tmpl file.
>
> Turns out that I had
> <style type="text/css" media="screen">
> @import url($SkinDirUrl/uwiki.css);
> </style>
> after
> <!--HTMLHeader-->
>
> Now I find that moving it up was necessary for this
> pub/css/Advocacy.css to work. I just hope moving it up still allows
> everything else that I have going on to work -- so far, so good. I
> have only the haziest concept of this (though much less hazy than
> before), but luckily I did have that recollection of the earlier
> thread (which I knew at the time could be important in some arcane
> way. Sure enough...)
>
> Anybody have any thoughts on what I could have broken by moving it?
Anything that you defined to override the PmWiki defaults (or recipes)
is no longer operative. The main issues are likely to be with the
pmwiki.php entries:
/* pmwiki.php
$HTMLStylesFmt['pmwiki'] = " */
ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
code.escaped { white-space: nowrap; }
.vspace { margin-top:1.33em; }
.indent { margin-left:40px; }
.outdent { margin-left:40px; text-indent:-40px; }
a.createlinktext { text-decoration:none; border-bottom:1px dotted
gray; }
a.createlink { text-decoration:none; position:relative; top:-0.5em;
font-weight:bold; font-size:smaller; border-bottom:none; }
img { border:0px; }
/* "; */
Your question was one of the main reasons why we were asking Patrick to
make the scope more easily accessible as part of a PmWiki release.
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.
--
Best,
Marc
More information about the pmwiki-users
mailing list