[pmwiki-users] Proposed Default Stylesheet (pmwiki.css)

David Spitzley dspitzle at wash.k12.mi.us
Mon Feb 20 08:20:03 CST 2006


>>> "Patrick R. Michaud" <pmichaud at pobox.com> 02/19/06 1:19 PM >>>
On Sun, Feb 19, 2006 at 06:57:52PM +0100, Joachim Durchholz wrote:
> Why was <p class="vspace"> introduced in PmWiki?

Because HTML is broken.  If you put the margins onto the <p>
elements themselves, then it becomes very difficult to get
lists and other block elements to appear adjacent to paragraphs.
For example, from Hans' Cookbook.GeminiSkin page:

    '''Colours'''
    * Blue colours
    * Sky colours
    * Sky-Blue colors
    * Sand colours

If the <p> has margins around it, then there will be vertical
space between "Colours" and the list that follows.  (There are
other examples of why <p class='vspace'> is really useful --
this is just the most recent.)

AFAICT, the only real way to avoid this is to never use <p> at all.
But then you still need something to be able to provide the
vertical spacing between elements.
------------------------

Personally, when I read that description of the problem, my automatic response is "why aren't you setting a class or id on the <p> tags surrounding Colours so you can set its spacing differently from the other <p> tags?"


David





More information about the pmwiki-users mailing list