[pmwiki-users] line spacing patch

Russ Fink russfink at hotmail.com
Fri Apr 1 09:50:46 CST 2005


>On Fri, Apr 01, 2005 at 10:16:10AM -0500, Russ Fink wrote:
> >
> > I'm using pmwiki-2.0.beta26.  The issue is I want to add extra spacing 
>to
> > my blocks, including bullet lists so that they space out a little bit
> > (e.g., double space).  There's a great example in WikiStyleExamples 
>about
> > using %block ... % to set styles on block lists, but unfortunately, I 
>can't
> > find an existing hook for the CSS property "line-height" which is what I
> > need.  [Maybe there are other ways to do this?]
>
>Well, yes, there are lots of ways to do this.  First, are you
>really wanting to increase line-height (which will increase the spacing
>between every line of text), or just the spacing between bullets?

Actually, I do need spacing btwn bullets, though both capabilities are nice 
to have.

>If you just want the spacing to increase between bullet items, you
>might try 'margin-top' instead.  However, I'm guessing you really
>do want increased line spacing, so ...

I made local mods to include margin-top (like you said) and what happens is 
it separates the block of bullets from above text, but does not separate 
each bullet individually.  If I remove the "block" in the below text, 
nothing is different than if the markup were gone entirely:

Some text
* %block margin-top=48px% whitespace does not separate the block, so this 
gets included.
** Subbullet 1 Directions for Use: It is a violation of Federal law to use 
this product in a manner inconsistent
** Subbullet 2 (don't you mean, torpedo?) Directions for Use: It is a 
violation of Federal law to use this product in a manner inconsistent
* second major bullet

>An administrator can add line-height (or any other CSS property) to
>the available WikiStyles without having to modify wikistyles.php --
>just add the line
>
>    $WikiStylesCSS[] = 'line-height';

Doing that would enable site-specific markup.  I myself can't think of a 
good reason to allow this, so I'll just never use it myself.  I'd rather 
stick to true PmWiki.  I'll concede there are cases I haven't thought of 
that might require custom site markup.

>
>to a local configuration file such as local/config.php.
>
>In addition, one could make use of CSS classes to do a similar thing:
>
>    $HTMLStylesFmt[] = ' .spaceout { line-height:2; } ';
>
>and then use %block spaceout% (or %block class=spaceout%) as the
>wikistyle.  Of course, the CSS entry could go into pub/css/local.css
>or become part of the skin instead of being specified in config.php.
>
>I don't have a problem with adding line-height to the list of allowed
>CSS properties in the distribution, if nobody objects.
>
>Pm
>





More information about the pmwiki-users mailing list