[pmwiki-users] Re: Binding several classes in wiki styles

Dominique Faure dominique.faure at gmail.com
Thu Dec 1 15:48:13 CST 2005


2005/12/1, Patrick R. Michaud <pmichaud at pobox.com>:
> I'm thinking that class attributes should automatically add
> even without the + sign in the wikistyle.  I'm not sure there's any
> case where we need a class attribute to overwrite a previous one--i.e.,
>
>    %rframe class='foo'%
>
> should always result in class='frame rfloat foo', not class='foo'.
> Similarly,
>
>    %define=wikilink class=wikilink%
>    %rframe wikilink%
>
> should result in class='frame rfloat wikilink', and not just
> class='wikilink'.  If we do come across a case where we need a
> wikistyle's class to override a previous one, we'll come up with
> a way to deal with it then.

I definitely vote for it in a next release!

BTW, I'd love to have a way to "parametrize" style definitions. Some
times ago, the %dlcol% style appaired on the mailing-list and provide
the actual rendering of the PmWiki's Cookbook homepage:

 $HTMLStylesFmt['columnlist'] = "
 dl.dlcol dt { float:left; padding-right:0.5em;}
 dl.dlcol dd { margin-left:13em; }\n";

 $WikiStyle['dlcol']['apply'] = 'list';
 $WikiStyle['dlcol']['class'] = 'dlcol';

Rendering:

: Term %dlcol% : Definition...

As:

<-13em->
Term    Definition

For now, the only way I found to have ajustable width for term lists is to add:

 $WikiStyleApply['descr'] = 'dd';
 $WikiStyle['descr']['apply'] = 'descr';

and write:

%define=dw descr margin-left:8em%
:Term1 %dlcol%:%dw% Definition1...
:Term2 :%dw% Definition2...

which is also not very writer-friendly. Any idea how to achieve this?

Dom




More information about the pmwiki-users mailing list