[Pmwiki-users] organization of .css files in pub/
Patrick R. Michaud
pmichaud
Sun Feb 15 20:42:51 CST 2004
John Rankin pointed out a problem with the pub/css/ directory in
the current beta releases...
Background
----------
With the default layout, PmWiki tries to include the following CSS files:
pub/css/stdlayout.css - basic/core styles
pub/css/$PageSkin.css - styles for current skin
pub/css/local.css - site-local styles
pub/css/$Group.css - group-specific styles for pages in $Group
pub/css/$Group.$Title_.css - page-specific styles for $Group.$Title_
(Note that this sequence can be changed via the $PageCSSFmt variable, but
for this discussion I'm talking about the default configuration.)
PmWiki comes with three stylesheets in its distribution, stdlayout.css (above),
pmwiki.css for the 'pmwiki' default skin, and print.css for the printable
view action.
All of this is great *except* if you happen to be on an OS (such as
Windows) that uses case-insensitive filenames. When this happens, the
$Group.css specification can accidentally conflict with the $PageSkin CSS's.
This is particularly noticable for pages in the PmWiki group, where the
pmwiki.css file is loaded even if a different skin is being used, but it
would also happen for a group called 'StdLayout' if one ever exists.
So, these need to be separated somehow. Note that separating based on
whether a file comes from the distribution (e.g., a pub/localcss/ directory)
doesn't really solve the problem, as a locally-defined skin name could still
conflict with a locally-defined group of the same name.
My best thought thus far is to create a separate 'skins' directory, or
a separate directory for each skin. Thus the sequence would then become:
pub/css/stdlayout.css
pub/skins/$PageSkin.css
pub/css/local.css
pub/css/$Group.css
pub/css/$Group.$Title_.css
and PmWiki would be distributed with pub/css/stdlayout.css,
pub/skins/pmwiki.css, and pub/skins/print.css.
By way of analogy, when/if others begin offerring other skins via the
Cookbook, I'd suggest a convention that .php configuration files
(if any) go in local/skins/$PageSkin.php and associated CSS files/gifs
be placed in pub/skins/ with the name of the skin as a prefix.
Does this work? Does anyone else have any other ideas? Note that for
long-term design purposes I'm unilaterally imposing the restriction that
PmWiki's default configuration will expect all css files to be somewhere
in the pub/ hierarchy (although a site admin can always change the default).
Pm
More information about the pmwiki-users
mailing list