[pmwiki-users] RFC: Eliminating <p class='vspace'></p>
Patrick R. Michaud
pmichaud at pobox.com
Sat Apr 1 03:19:16 CST 2006
After 2+ years of making essentially the same arguments
over and over again about the <p class='vspace'></p> tags in
output (and coming to the same conclusions each time), I find
I'm weary of the ongoing struggle and just want it to go away.
So, let's eliminate <p class='vspace'></p>, even if it
screws things up.
Here's the proposal I'm currently playing with:
- There will no longer be any <p class='vspace'></p> in the output.
- "Bare" text that follows a blank line and is not associated with
any block-level markup becomes <p class='vspace'>...text...</p>.
- Bare text not associated with block level markup that does *not*
follow a blank line becomes a simple <p>...text...</p>.
(Perhaps we'll put a class= designator on this as well -- I
just can't come up with a good name at the moment.)
- Other blank lines in the markup (e.g., in lists) produce
<div class='vspace'><div> to generate vertical whitespace
(controlled by the $HTMLVSpace variable).
Some likely consequences of this proposal:
1. Because "paragraph text" will be producing either <p>
or <p class='vspace'>, the wikistyles.php code will have to be
substantially modified in order to properly apply styles to
paragraphs containing a class= attribute. (Is this okay,
John? I'll be glad to help with any side effects to
wikipublisher.php.)
2. The use of <div class='vspace'></div> may cause vertical
spacing to break in some older browsers (I think that IE 4
and IE 5 are affected by this).
3. Allister and other authors will be able to achieve the effect
he needs by using markup like:
Here is some text
%p margin-top:0.5em% More text
%p margin-top:0.5em% Still more text
Similarly, an author can do:
%center% This is a paragraph with centered text.
%p margin-top:0% This is another paragraph immediately
beneath the previous one and left justified.
4. This proposal does not necessarily invalidate the earlier
proposal for an explicit paragraph markup -- my comments regarding
the potential usefulness of starting a new paragraph without
requiring a blank space still apply.
5. Because this is a fairly substantial change that can
impact existing skins and sites, the release containing
these changes should perhaps be given a new major release
number -- i.e., 2.2.0.
6. For those sites that need it, there will be an option of
some sort to cause PmWiki to revert to its existing 2.1.x
behavior of using <p class='vspace'></p>.
Comments welcome.
Pm
More information about the pmwiki-users
mailing list