[pmwiki-users] History Output Unnecessarily Wide

H. Fox haganfox at gmail.com
Sat Aug 13 19:34:52 CDT 2005


On 8/12/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Aug 12, 2005 at 08:33:24PM -0700, H. Fox wrote:
> > > > Much more readable:
> > > > http://www.pmwiki.org/wiki/PmWiki/FAQ?action=diff&skin=light
> > >
> > > Just so I don't have to go searching for it, what's the magic
> > > that light skin does to prevent the wide boxes...?
> >
> > I was afraid you'd ask that.  I don't remember!  It's been a while
> > since I did it.  It was a head-scratcher at the time...
> >
> > Here are the .diff* CSS selectors.
> >
> > .diffbox { width:740px; margin-top:10px; }
> > .diffadd code, .diffdel code { padding-right:1px; white-space:normal; }
> > .diffrestore, .difftype, .difftime .diffauthor { font-size:8pt; }
> > .diffrestore { margin-top:2px; }
> >
> > Maybe "white-space:normal;" was the key?
> 
> Doesn't appear to be.  The offending lines are <pre>...</pre>,
> and adding the above white-space:normal properties into my local.css
> didn't seem to solve the problem.
> 
> Looks like it's the explicit width property on .diffbox that is
> preventing the extra-wide boxes.

Yes that seems to be it.  Here's something I think works well:

1) Set a width.  740px is about right (works at 800x600, etc.).
2) Remove the border, except on the left  side of the box.

I did a small hack of scripts/pagerev.php so it now says:

   .diffbox { width:740px; border-left:1px #999999 solid; margin-top:1.33em; }

This keeps the action links from moving off the page in the default
pmwiki skin (much better!) and makes otherwise-wide history pages much
easier to read.

I can achieve the same with the following in local/config.php:

.diffbox { border:none; }
.diffbox { width:740px; border-left:1px #999999 solid; }

Is it possible to override the selector in config.php?  If not, could
it be made so?

Also, the line above that one in scripts/pagerev.php is

$HTMLStylesFmt[] = "

Just curious: Why not

$HTMLStylesFmt['diff'] = "
or
$HTMLStylesFmt['pagerev'] = "

Hagan




More information about the pmwiki-users mailing list