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

Dominique Faure dominique.faure at gmail.com
Thu Dec 1 14:21:52 CST 2005


2005/11/22, Dominique Faure <dominique.faure at gmail.com>:
> 2005/11/22, Patrick R. Michaud <pmichaud at pobox.com>:
> > On Tue, Nov 22, 2005 at 03:58:14PM +0100, Dominique Faure wrote:
> > > I'm looking for a mean to "merge" style definitions into wiki text
> > > without the help of local customization file. Currently, the following
> > > text:
> > >
> > >   %style1 style2% Stylized text
> > >
> > > is rendered as:
> > >
> > >   <span class='style2' > Stylized text</span>
> > >
> > > using the last declared style class. How about a small style syntax
> > > enhancement to allow the rendering of:
> > >
> > >   %style1 +style2% Stylized text
> > >
> > > as:
> > >
> > >   <span class='style1 style2' > Stylized text</span>
> >
> > Would this be only for class= attributes?  In other words, if
> > we have
> >
> >   %define=style1 color=red%
> >   %define=style2 color=blue%
> >
> > would you expect %style1 +style2% to become ... ?
> >
> >    <span style='color:red; color:blue;'>
> >
>
> I was primarily thinking of the 'class' attributes.
> Anyway, I found a solution myself with regular style definitions as:
>
>  %class='style1 style2'%  Stylized text

If the above tips is working, it suffers for the tight CSS binding: My
first goal was to provide a way to allow users to remove the external
link decoration I introduced with the monobook skin.

Applying a %wikilink% style to these links works like a charm until
they are not already class-stylized (with the %frame% style for
example). In this case, the style definition should be %class='frame
wikilink'% to get the expected result.

This not-really-user-friendly syntax is getting worse when trying to
deal with already %lframe% or %rframe% stylized links. There, the
required style definition should become %class='lfloat frame
wikilink'% or %class='rfloat frame wikilink'% since %[rl]frame% aren't
"atomic CSS classes.

I just wanted to be able to write something like %rframe +wikilink%,
which in my case could resolve to a merge of class attributes only.
OTOH, CSS allow multiple declaration of the same attribute (with the
last one as winner), so this could be acceptable.

Regards,
Dom




More information about the pmwiki-users mailing list