[pmwiki-users] change rfloat/lfloat rules

Patrick R. Michaud pmichaud at pobox.com
Sun Oct 1 15:51:29 CDT 2006


On Sun, Oct 01, 2006 at 04:30:56PM -0400, Henrik Bechmann wrote:
> I added
> 
> $HTMLStylesFmt[] = "
>  .lfloat { float:left; margin-right:5px; }
>  .rfloat { float:right; margin-left:5px; } \n";
> 
> to (farm)config.php with the following result on the generated page:
> [...]
> IOW the entry in $HTMLStylesFmt is not (necessarily) given precedence 
> over the native entry. Is there another way, using $HTMLStylesFmt, to 
> give my config.php entry precedence, or is entry in a cusom css file the 
> only way?

Sorry about that, I wasn't paying close enough attention to
the fact that .lfloat and .rfloat come from wikistyles.php.

You can have your config.php entry get precedence (occur later)
by explicitly including scripts/wikistyles.php before adding it

  include_once("$FarmD/scripts/wikistyles.php");
  $HTMLStylesFmt[] = "
    .lfloat { float:left; margin-right:5px; }
    .rfloat { float:right; margin-left:5px; } \n";

> Re: an example for IE6:
> [...details snipped...]

Thanks for the explanation.  Yes, I agree that there are a
lot of times where fixed margins (5px) are easier to work with
than relative ones (.5em), but there are lots of people who
passionately disagree on this point.  It depends on the site
and application.  :-)

> OTOH, it is an interesting case for the ability to over-ride core css 
> settings in a straightforward manner.

No matter how we structure it, there will always be some 
overrides that aren't "straightforward" -- it's just the nature
of customization in general.

Thanks,

Pm



> Patrick R. Michaud wrote:
> >On Sat, Sep 30, 2006 at 10:16:05PM -0400, Henrik Bechmann wrote:
> >  
> >>I want to change rfloat/lfloat rules from
> >>
> >>    .lfloat { float:left; margin-right:.5em; }
> >>    .rfloat { float:right; margin-left:.5em; }
> >>
> >>to
> >>
> >>    .lfloat { float:left; margin-right:5px; }
> >>    .rfloat { float:right; margin-left:5px; }
> >>
> >>What's the most concise/legitimate way to do this?
> >>    
> >
> >I'd do it in pub/css/local.css .
> >
> >It can also be done from config.php with:
> >
> >    $HTMLStylesFmt[] = '
> >      .lfloat { float:left; margin-right:5px; }
> >      .rfloat { float:right; margin-left:5px; } ';
> >
> >  
> >>(the .5em is giving IE6 fits in certain contexts -- poor old thing!)
> >>    
> >
> >Ooh, could you give an example?  Is it serious enough to warrant
> >changing the core?
> >
> >Pm
> >
> >  
> 
> -- 
> 
> Henrik Bechmann
> www.osscommons.ca
> www.bechmannsoftware.com
> Webmaster, www.dufferinpark.ca
> 
> 




More information about the pmwiki-users mailing list