[pmwiki-users] Help creating a custom style?
Patrick R. Michaud
pmichaud at pobox.com
Tue Jan 25 18:25:57 CST 2005
On Tue, Jan 25, 2005 at 05:35:03PM +1100, Jonathan Smith wrote:
> Hello
>
> I'd like to make a custom style that defines a width and font-style
> attribute.
>
> I've tried:
>
> $WikiStyle['pagequote']['width'] = '400';
> $WikiStyle['pagequote']['font-style'] = 'italic';
>
> in both the config and wikistyle.php files but no luck.
>
> Only the font-style attribute gets displayed. I feel like the answer may
> lie in the wikistylecss[] but I don't understand it.
Unfortunately "width" is one of those strange attributes that occurs
both in CSS and HTML. At the moment (and for historical reasons)
PmWiki chooses to use it to be able to produce width='...'
attributes in <img> tags, which makes it difficult to also use it
for <span> styling.
At the moment I don't have a good permanent solution to this problem,
and I can totally understand how this would be desirable or useful.
In the meantime, a good (and safe) workaround is to use CSS classes
directly rather than trying to program the $WikiStyle array.
Instead of setting $WikiStyle['pagequote'] -- just use
$HTMLStylesFmt['pagequote'] =
" .pagequote { width:400; font-style:italic; }\n";
and %pagequote% will then generate <span class='pagequote'>
which will do what you want.
Pm
More information about the pmwiki-users
mailing list