[pmwiki-users] Problems with the embedded CSS in pmwiki.php
Hans
design5 at softflow.co.uk
Mon Oct 30 12:35:20 CST 2006
Monday, October 30, 2006, 4:06:05 PM, Patrick wrote:
> Having the CSS file "loaded by default" doesn't at all resolve the
> original issue that started this thread. The only ways that a
> pmwiki-core.css file can achieve the desired semantics (admin
> overrides skin overrides core) is by one of the following:
> - All templates explicitly load pmwiki-core.css at an appropriate location.
> - The skin has a skin.php file that manipulates $HTMLHeaderFmt.
> - We define an "automatically loaded skin.css" rule that adds
> a link to a per-skin css file between the pmwiki core CSS and
> any site-specific (local) CSS files.
> Currently PmWiki goes with the second option.
With this second option I do not see that it is up to the skin.php to
load a pmwiki-core.css file. It could just as well be loaded from
pmwiki.php with a $HTMLHeaderFmt['pmwiki-core'] definition. This will
load at the beginning of HTMlHeader, leaving admin/local
customisations etc to override styles if needed. A skin can still load
a css file later.
> The problem is that transitioning the universe of existing PmWiki
> installations and skins to exclusively use a standard pmwiki-core.css
> file is likely to be a hassle at this point, and I'm not sure it's
> worth the hassle.
I understand. But a pmwiki upgrade will just add the new
pmwiki-core.css file, load it, and not use any more HTMLStylesFmt
definitions to add the core styles from pmwiki.php and some scripts.
It does not need a universal change in all skins.
> Even if we provide pmwiki-core.css, skins will
> *still* have to use something to manipulate $HTMLHeaderFmt and/or
> $HTMLStylesFmt, so I'm not sure we're saving anything. (Either that
> or we do some deep magic in analyzing skin templates to decide that
> the core styles are already being included by the template.)
I don't see that that is necessary, merely optional for a skin
designer. But maybe I overlooked something fundamental here?
Hans
More information about the pmwiki-users
mailing list