Forum OpenACS Development: Re: template::head::add_css problem

Collapse
Posted by Don Baccus on
Well, my suggestion was to order the CSS when they're output by the master template, I haven't looked but I assume at some point the array used to store is transformed into a multirow, and the LINKs can be ordered there. I assume the add_css call uses an array to avoid linking more than once (i.e. a second call to add_css with the same stylesheet will just overwrite the existing entry).

Normally, I'd say this makes sense:

Usually, the designer/developer will call add_css in the order she wants the CSS to appear in the HEAD block. So keeping track of the order they were added sounds reasonable to me.
But when a user customizes their portal page, moving portlets around, doing so will re-order the order in which the portlets (and therefore template::head::add_css commands) will be executed.

So the package developer doesn't really have control over the ordering, do they????

I would also say that package CSS shouldn't overwrite normal CSS anyway. If I visit a package page, it shouldn't (for instance) change the developer toolbar to screaming red or whatever! It should only define CSS specific to the package.

So my perhaps overly simplistic view is that only alternate stylesheets and media-specific stylesheets should overwrite our normal CSS classes.

I guess "media type=all" should preceed "screen", "print" etc in the alternative stylesheet ordering, too???