[pmwiki-users] Problems with the embedded CSS in pmwiki.php
marc
gmane at auxbuss.com
Mon Oct 30 06:20:51 CST 2006
Hans said...
> Sunday, October 29, 2006, 6:21:22 PM, marc wrote:
>
> > In the recommended case:
>
> > <link rel='stylesheet' title="Skinname"
> > href='$SkinDirUrl/Skinname.css' type='text/css' />
> > <!--HTMLHeader-->
> > </head>
>
> > PmWiki comes in last (ignoring local customization), but in this case
> > coming in last means that it wins. But, as we established before, by
> > using:
>
> > <!--HTMLHeader-->
> > </head>
>
> > and adding the following to skin.php
>
> > global $HTMLHeaderFmt;
> > $HTMLHeaderFmt['skin'] =
> > "<link rel='stylesheet' href='\$SkinDirUrl/skin.css'
> > type='text/css' />";
>
> > the skin template wins by coming last.
>
> I am coming in late on this discussion, but would like to make this
> point:
> A skin designer may have reason from a stylistic design perspective to
> wish to override some of pmwiki core css styles. For this reason, and
> for reasons of efficiency and reducing page loads, it would be good,
> IMHO, to provide all pmwiki core css styles on a separate stylesheet
> in pub/css/, which then could be easily checked, or changed or
> overridden.
That's certainly the central theme of the discussion.
> The skin designer would add an extra line in the template
> to facilitate loading of this pmwiki-core.css file.
I suspect that this CSS file would be loaded by default - so as not to
break the default install [where it would be loaded in any case, in your
scenario] and not to break any existing skins. Perhaps an $Enable
variable could be provided to switch it off, though.
> She can choose if
> this will take place before or after loading any skin css file(s), or
> indeed sandwiched between loading a primer and a later skin css file.
> The design overhead is minimal, and no php code needed either:
> For instance in the template like this:
>
> <link rel='stylesheet' href='\$SkinDirUrl/skin1.css' type='text/css' />
> <link rel='stylesheet' href='\$PubDirUrl/css/pmwiki-core.css' type='text/css' />
> <link rel='stylesheet' href='\$SkinDirUrl/skin2.css' type='text/css' />
> <!--HTMLHeader-->
>
> </head>
That would certainly be in the PmWiki style of unbelievable flexibility.
> And the skin template may contain an optional third (or the second one
> moved down) css file after the <!--HTMLHeader-->, which would override
> even any local css customisation (perhaps only desirable for a few css
> settings).
Local/admin customizations always win, since there will always be a need
to override the template and/or recipe styles.
> We could move towards a standard pmwiki-core.css file already now, by
> pmwiki providing one in pub/css/
This is possible now, but Patrick is the oracle on the repercussions
that pass over us mortals ;-)
--
Best,
Marc
More information about the pmwiki-users
mailing list