[pmwiki-users] Lack of ability to use % in CSS directives a real pain

Tamara Temple tamouse.lists at gmail.com
Sat Jun 11 22:51:07 CDT 2011


On Jun 11, 2011, at 9:25 PM, CSGA_KPX wrote:

> 'Pct' is replaced by % in markup translation.
>
> in scripts/wikistyles.php
> SDVA($WikiStyleRepl,array(
>   '/^%(.*)%$/' => '$1',
>   '/\\bbgcolor([:=])/' => 'background-color$1',
>   '/\\b(\d+)pct\\b/' => '$1%',
>   ));
>
> I use this code on pmwiki.org
> %block width=50pct % xx %%
> and it produces
> <p style="width: 50%;"> xx
> </p>
>
> Hope this helps.
>
> 2011/6/12 Tamara Temple <tamouse.lists at gmail.com>:
> > In http://www.pmwiki.org/wiki/PmWiki/WikiStyles , one of the Known  
> Issues
> > is:
> >
> > "Percents in style definitions (like: %block width=50% %) require  
> the use of
> > "pct" instead of "%"."
> >
> > This is a REAL pain, because "pct" is not valid (nor necessarily  
> recognized)
> > CSS unit. Thus my desire to have 3 divs side-by-side each taking  
> up 1/3 of
> > the space is not possible without rewiring the skin template, thus  
> making it
> > not portable to other skins. Is there ANY chance this can be fixed?

Ah, I see my problem. I was using a (:div:) with style info; the %  
works there fine.

I would have used the %block% markup, but I need to include several  
blocks (a heading and a list, basically) in each of the three portions.

Sorry for the confusion/intrusion.




More information about the pmwiki-users mailing list