[Pmwiki-users] wikistyles and a general remark to subject
Patrick R. Michaud
Fri Jun 11 09:58:40 CDT 2004
On Thu, Jun 10, 2004 at 03:39:16PM +0200, Knut Alboldt wrote:
> I played arround the last time with the wiki-styles and had to define a lot
> of them. It was rather much things to do:
> - defining a $WikiStyleTag-entry
> - defining a $WikiStyle-Entry
> - and - because I use them in junction with skins - defining a
> corresponding class.
> So I thought of a maybe better implementation of the wikistyles for Version
> All wikistyles are just names of style-classes, the major can be defined in
> stdlayout.css, e.g.
This may be an *excellent* idea. It wasn't/isn't possible in 0.6, because
by the time the WikiStyle definitions were being processed from the markup,
the <head>...</head> section of the document had already been output. But
it might be possible in 2.0.
One problem is in coming up with the ability to define new WikiStyles
from existing ones. For example, one can currently do
%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'm not sure how strong browser support is for multiple classes in
class= attributes (e.g., <span class='class1,class2,class3'>...</span>).
Anyone have any knowledge they could add to this? Any CSS experts out
> I would suggest:
> is parsed as
> <span class="wikistyle">text</span>
> %wikistyle% \\
> text \\
> %% \\
> will be parsed as
> <div class="wikistyle">
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
In addition, since PmWiki 2.0 now properly containerizes all text into
blocks, I'll likely be introducing "block wikistyles"...
%bgcolor=red block=y% This paragraph has a red background.
The presence "block=y" in the wikistyle specification indicates that the
style is to be applied to the entire block, and not just the inline
This is a new paragraph, so the red background is gone.
%align=center block=y% This is a center-aligned paragraph.
# %block=y list-style=lower-roman% This is a list using roman numerals.
Of course, one can use block in definitions, thus:
%define=redblock bgcolor=red block%
%define=center block align=center%
%define=right% block align=right%
%define=roman block list-style=lower-roman%
%define=ROMAN block list-style=upper-roman%
So that one can use %redblock%, %center%, %right%, %roman%, etc as
More information about the pmwiki-users