[pmwiki-users] line spacing patch

Patrick R. Michaud pmichaud at pobox.com
Fri Apr 1 09:32:56 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?
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 wrote a line-height mod into scripts/wikistyles.php, and am attaching the 
> patch file.  

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';

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