order of css ?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

order of css ?

Post 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/
Last edited by kermit on Thu Jan 26, 2006 2:01 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: order of css ?

Post 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.
LeisureLarry

Re: order of css ?

Post 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.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: order of css ?

Post 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.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “Layout and Design (CSS & HTML)”