Page 1 of 1

order of css ?

Posted: Thu Jan 26, 2006 11:50 am
by kermit
is there any mechanism that determines the order of the css stylesheets when combined and output to the client?

if there isn't; there should be.

the reason i ask this is that i have a 3 column layout in one stylesheet and then have an additional one that turns it into a 2 column layout (no changes to the html itself), and then also have one i can apply after that to flip the order of those 2 columns (eg. sidebar right instead of sidebar left). the order the styles get applied (that's the whole concept of 'cascading' in css) are important.

these layouts, in case you're wondering, were originally based on ones found at http://webhost.bridgew.edu/etribou/layouts/

Re: order of css ?

Posted: Thu Jan 26, 2006 8:26 pm
by Ted
I agree that this is a good idea.  Probably an ordering scheme similar to how the content admin works with simple up/down buttons.  I'll see what I can do.

Re: order of css ?

Posted: Fri Jan 27, 2006 11:58 am
by LeisureLarry
I think that would be really great. At the moment I only use only one CSS and no combined, but because I plan to change my CSS like Google does on special dates, it would be really helpful.

Re: order of css ?

Posted: Sat Jan 28, 2006 12:56 pm
by kermit
in the absence of the ordering proposed by wishy.. (which i was kinda suprised wasn't already included, given how the stylesheets are maintained presently),  it appears that stylesheets are applied in the *reverse* order they are added to a template.. meaning the last one added is the first one applied..

if you have (and need them in this order):
layout
formatting
design
print

then add them to the template in this order:
print
design
formatting
layout

at least that's how i had to do it when i was porting the aura template from http://www.leorex.com which does have it's styles broken into four files like that.