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

H. Fox haganfox at users.sourceforge.net
Sun Feb 19 16:24:12 CST 2006


On 2/19/06, Susan <pmwiki at onebit.ca> wrote:
> Are you thinking of changing the way PmWiki converts wiki-text to HTML,
> or just working on a style sheet?
>
> Changing the way PmWiki converts wiki-text to HTML will likely mess up
> existing installations.

Possibly, but this is the nature of beta software.

There's also the possibility (likelihood?), explained below, that it
will un-mess up some existing existing installations.

> However, if that's what you're considering, I'd
> say that blank vertical space in the wiki text gets eaten:
>
> One newline character is ignored (converted to a space between words).
> Most authors can't tell whether they've included one or not.

No, it's not converted to a space.  It's just ignored.

I'll try to explain the eat-a-newline proposal the way I see it.

In modifying the default skin, I uncovered an undesirable effect that
occurs in *any* skin where margins below headings are narrower than
the very wide default margins (as rendered by most browsers).

The reason to shrink the margin is to have the margin *below* headings
is smaller than the margin *above* them.  This visually cues the
reader that the heading belongs to its content.

As it is now, you get different XHTML output if you have zero or one
newlines following a heading.  If there's one or more newlines, a <p
class='vspace'> (I'll call this a "vspace paragraph") is produced.

When the heading's bottom margin is large, the vspace paragraph has no
effect, but when the heading's bottom margin is small, it does.  If
you change to a skin with a small bottom margin, your headings can
unexpectedly look "mixed", since some authors may prefer to use a
newline after headings and others may not.

You can see this effect on the Documentation Index page.  If a skin
author attempts to reduce the margin below headings in order to cue
readers that a heading belongs to its content, the whitespace below
"Beginner Topics for Creating and Editing Pages" becomes wider than
the whitespace below " Intermediate Editing Topics".

http://www.pmwiki.org/wiki/PmWiki/DocumentationIndex?skin=pmwiki-hf
http://www.pmwiki.org/wiki/PmWiki/DocumentationIndex?skin=light

The eat-a-newline proposal is requested so both of those headings will
have the smaller amount of margin.  To get the wider margin you see
below ""Beginner Topics for Creating and Editing Pages", an author
would need to insert *two* newlines after the heading.

Put another way, there would be the same XHTML output with zero or one
newlines following a heading, and a <p class='vspace'> would be
produced if there are two or more newlines following a heading.

Hagan




More information about the pmwiki-users mailing list