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

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 1 09:11:48 CST 2006


On Wed, Nov 01, 2006 at 12:42:07PM +0000, Hans wrote:
> Tuesday, October 31, 2006, 4:41:22 AM, Patrick wrote:
> 
> > On Mon, Oct 30, 2006 at 10:17:32PM +0000, Hans wrote:
> >> I just tried to create this sequence, but found that I needed to have
> >> some core skin layout styles already loaded first, thus:
> >> 
> >>   a. skin layout styles
> >>   b. core pmwiki styles
> >>   c. recipe styles/admin styles via HTMLStylesFmt
> >>   d. further skin styles (styling, colors, fonts, print styles)
> >>   e. local.css and other localisation styles
> >> 
> >> To add all skin styling late did not work. 
> 
> > Hmmm, why is that?  If there's not a conflict, it shouldn't
> > matter; if there is a conflict, then we generally want the skin 
> > to be last anyway.
> 
> I have to come back on this one:
> The reason why some skin layout css needs loading early, before
> $HTMLHeader, is, because some layout manipulation from within the wiki
> pages uses a directive, which injects css styling for page divs via
> $HTMLStylesFmt

Directives aren't limited to injecting styles via $HTMLStylesFmt -- 
they can also inject <style>...</style> via $HTMLHeaderFmt.  

And saying that we want a skin loaded early (before $HTMLStylesFmt)
doesn't mean it has to be loaded first.  The sequence is then

    a. core PmWiki styles
    b. skin styles
    c. recipe/dynamic styles (via $HTMLStylesFmt)
    d. local/admin styles

and this is handled just fine with a skin template of:

    <link href='$FarmPubDirUrl/css/pmwiki-core.css' ... />
    <link href='$SkinDirUrl/skin.css' ... />
    <!--HTMLHeader-->

But the point still remains that the current PmWiki design has 
plenty of flexibility to give the skin the "final say" in how 
things are ultimately displayed.  Simple skins are implemented
simply, while complex ones are possible.

Pm




More information about the pmwiki-users mailing list