[pmwiki-users] css for just one wikigroup

marc gmane at auxbuss.com
Mon Nov 6 06:10:17 CST 2006


Hans said...
> Sunday, November 5, 2006, 7:05:56 PM, marc wrote:
> 
> > I'd argue that a recipe that loads its CSS after local customisation is
> > broken. There's no reason to do it, after all. And it breaks the PmWiki
> > model, at least as I understand it.
> 
> I would not call it broken.

My reasoning is that when installed, the recipe style (might) override 
the skin template - which, in my case, I have carefully manoeuvred into 
place so this never happens - and local customisations. I would argue 
that a recipe shouldn't do that.

> And it uses a standard pmwiki way of adding HTML into the page head.

Yup, but in so doing knowingly places it somewhere where it has the 
potential to break things.

> And a recipe author when using this method
> ($HTMLHeaderFmt) has no control where the code will be placed.

I really should check, but I presumed it is first in, first out; in 
which case, this scenario shouldn't happen without the recipe author 
trying quite hard to break things :-( 

> Using $HTMLStylesFmt styles will allways go into the <styles> section
> right after <!--HTMLHeader-->, using $HTMLHeaderFmt not in a function
> called by markup will place it before the skin.css if the skin.css is
> loaded with $HTMLHeaderFmt, but used in a function called by markup it
> will come after, and last in the loading sequence.
> 
> If this is not quite as pmwiki intended ("breaking the model", as you
> call it), then I think something in pmwiki needs changing, to prevent
> this, and not in the recipe. As I said, I think it is smart for markup
> to call a function, and loading of styles etc is done through this
> function, for pages where needed, and not general.
> 
> I still have lots of way to improve my code writing in this respect.
> But I am curious what Pm may say to this issue of late loading via a
> function call.

I agree. As I say, it doesn't bother me personally, because I change 
most recipes locally, so any - as I see - errant behavior, will be 
ejected on sight. This doesn't help a less hacky PmWiki user, though, 
who would likely be frustrated by being unable to format their <p> 
elements - taking the worst case - because a recipe has hijacked it.

-- 
Best,
Marc





More information about the pmwiki-users mailing list