[pmwiki-users] RFC: Eliminating <p class='vspace'></p> (REVISED)
Patrick R. Michaud
pmichaud at pobox.com
Sun Apr 2 23:19:58 CDT 2006
On Mon, Apr 03, 2006 at 03:11:56PM +1200, John Rankin wrote:
> On Monday, 3 April 2006 2:18 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Mon, Apr 03, 2006 at 12:57:11PM +1200, John Rankin wrote:
> >- An alternate custom markup rule can be made available in the
> > Cookbook that will coalesce the <div class='vspace'></div>
> > into class="vspace" attributes for list items, definitions,
> > tables, and other elements in addition to paragraphs.
>
> and perhaps a rule to act as an example for sites that want to
> support unspaced paragraphs:
>
> Here's a normally spaced book paragraph followed
> by an unspaced but indented paragraph. Lorem ipsum
> dolor sit amet, consectetuer adipiscing elit. Etiam
> diam tellus, dapibus vitae, sagittis eu, aliquam sit.
>
> %book% amet, sapien. Donec rutrum ante sed metus.
> Vestibulum ante ipsum primis in faucibus orci
> luctus et ultrices posuere cubilia Curae.
>
> In this case, I think, the second paragraph will want to
> turn into <p class='book'> not <p class='vspace book'>.
Actually, it can still be made to work correctly in CSS.
If we define our classes as:
.vspace { margin-top:1.33em; }
p.book { margin-top:0; text-indent:40px; }
Then the "margin-top:0" setting of p.book will override the
margin-top value given by the vspace class, because p.book
has a stronger (more specific) CSS selector.
See, for example, http://www.pmichaud.com/sandbox/vspace.php .
Pm
More information about the pmwiki-users
mailing list