[Pmwiki-users] PmWiki skinning

Patrick R. Michaud pmichaud
Mon Nov 8 10:54:03 CST 2004


On Sat, Nov 06, 2004 at 12:48:17AM +0100, Thomas -Balu- Walter wrote:
> I know that those defaults are there to make it easier for unexperienced
> skin developers, but the other way round they make it more difficult for
> people like me who want to heavily modify the default skin :).

It's more than that.  Some 'defaults' are there because PmWiki simply
doesn't work without them -- e.g., the indent/outdent classes for
indent and outdent text, styles for formatting page history results,
etc.

> Such things include the default for e.g. $PageLogoFmt. The default looks
> like this: 
> "<div id='wikilogo'><a href='$ScriptUrl'><img
>   src='$PageLogoUrl' alt='$WikiTitle' border='0' /></a></div>"
> [...]
> So I suggest to remove the div from $PageLogoFmt. And add a <div> to the
> pwiki skin template.

Actually, I suggest eliminating $PageLogoFmt altogether.  It's left over
from the pre-0.6 (pre-layout template) days when admins wanted to be 
able to change the logo code (especially the link target) but didn't 
want to have to redefine $PageHeaderFmt to do it.  Now that we control
things via layout templates, we probably don't need $PageLogoFmt
anymore (although I will keep $PageLogoUrl).

> Another thing are the styles added in the HeaderText. Those exist so
> that things like vertical space, code, etc. look like in the default
> wiki. But always adding them makes it difficult to override them too. 

Well, you can always do $HTMLStylesFmt['pmwiki']='';  to get rid
of them if you don't want them.

> E.g. to not have the createlinktext links be underlined I have to add a
> CSS below the default:
> a.createlinktext { text-decoration:none; border-bottom:1px dotted grey; }
> a.createlinktext { border-bottom: 0px }

There's a good case to be made that the createlinktext class belongs
as part of the default skin's .css and not the default.

> My suggestion would be to put those into a css-basics.css or something
> like this and make the default skin include it. Skin admins might or
> might not include it too. 

PmWiki v1 did it exactly this way, via the pub/css/stdlayout.css file,
but I didn't like the results.  If an admin forgets this file when
creating the skin, there's a fair amount of surprise when indent,
outdent, page history, and other built-ins "stop working", which then
result in frequent misreports of PmWiki "bugs".  

The idea is that the default stylings produced in <!--HeaderText-->
are things that PmWiki (and cookbook modules) really need to be set in 
order for things to have any hope of working in the 95% of cases that
are out there.  For the specific instance of "a.createlinktext", I don't
see any problem with it moving to the default skin's .css file--arguably
it belonged there in the first place.  But the other items--
  - margins on ul, ol, pre, dl, p
  - vspace
  - indent
  - outdent
  - non-breaking whitespace in <code>
really make more sense as PmWiki defaults that require some sort of
explicit override, rather than having them be accidentally "lost" because
of an inadvertent omission.

Pm



More information about the pmwiki-users mailing list