[Pmwiki-users] wikistyles and a general remark to subject

Knut Alboldt alboldt
Sat Jun 12 01:39:04 CDT 2004


At 11.06.2004 17:58, Pm wrote:

>One problem is in coming up with the ability to define new WikiStyles
>from existing ones.  For example, one can currently do
>
>    %define=xxx class=myclass%
>    %define=red color=red%
>    %define=mystyle red xxx%
>
>so that mystyle becomes the combination of class='myclass' and color='red'.
>But if wikistyle definitions become classes, there's no way (that I'm
>aware of) to have a new CSS class definition inherit all of the
>properties of an existing CSS class definition.  And since PmWiki doesn't
>have access to all of the class properties--some will be defined in
>templates or other location (e.g. "myclass" above)--it can't simply
>define all of the class properties at once.

I didn't notice that you can already refer to a class within the wiki-style 
definitions. How's about that:
%define=class%
or
%define=xxx class=myclass%
refers to a style-class, just to shorten the definition (so default = 
class-reference). On the other hand
%define=xxx class=myclass%
would be good enough, I dont think the definition will be used too often 
individually in a page, maybe mor in group-headers ?

And another suggestion for teh style-reference is:
when refering to a wikistyle like in
            %anystyle%text%% text
it could be implemented that first it will be searched for an existing 
$WikiStyle['anystyle']-entry, if no one exists a <span 
class='anyclass'>text</span> is generated.


>I'm not sure how strong browser support is for multiple classes in
>class= attributes (e.g.,   <span class='class1,class2,class3'>...</span>).

I didn't find anything about that but at least it doesn't work in Mozilla.

You could do a workaround like:
<span class="class1><span class="class2><span 
class="class3>text</span></span></span>
Only that any formatting attribute which is defined in more than one class 
will be overwritten by the last class reference


>Anyone have any knowledge they could add to this?  Any CSS experts out
>there?
>
>Pm
>
>
> > I would suggest:
> >   %wikistyle%text%%
> > is parsed as
> >   <span class="wikistyle">text</span>
> > and
> >   %wikistyle%
> >   text
> >   %%
> > and
> >   %wikistyle% \\
> >   text \\
> >   %% \\
> > will be parsed as
> >   <div class="wikistyle">
> >   text
> >   </div>
>
>I'm not comfortable with the idea that wikistyles cross markup
>line boundaries, because bizarre things can happen, and from an authoring
>perspective it's just easier to say that wikistyles always terminate at
>a line boundary.
>
>On the other hand, PmWiki 2.0 will be introducing [:div:] (similar
>to [:table:], [:cell:], etc., actual markup to be decided), so that
>one can do
>
>   [:div class=wikistyle:]
>   text
>   text
>   [:divend:]
>
>In addition, since PmWiki 2.0 now properly containerizes all text into
>blocks, I'll likely be introducing "block wikistyles"...
>...

I like that !
So my suggested solution might be obsolete (it would be just another way to 
do it)

Another thing I noticed:
In version 0.6 I defined a wikistyletag "font-family" (I think it's also 
implemented in one of the cookbook-recipes).
This works well if I use
%define=style1 font-family=Arial%
but
%define=style1 font-family="Paquette SSi"%
does not, i.e.
If the values are enclosed in quotes / double-quotes, the parsing of the 
value is incorrect.

Knut 




More information about the pmwiki-users mailing list