Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-24 19:55:00

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

UPDATE: Don't do this :: Nested CSS files :: How to

[edit] Do not do this. It can slow any largish site to a crawl.

You can nest CSS stylesheets AND administer them via the style tab by doing the following:
  1. Create an empty master CSS stylesheet
  2. Create categorized child CSS stylesheets, ie -navigation, -type, -position
  3. Edit your master stylesheet to include the child stylesheets on import with the following pieces of code: <code>@import url(css.php?n=-childCSSfilename);</code> Include one entry for each child CSS stylesheet
  4. Select the master CSS file in your sections tab.

Hope this helps someone. I got tired of scrolling long CSS documents.

Last edited by mrdale (2006-11-02 17:58:52)

Offline

#2 2006-05-18 11:03:33

Sebastiaan
Member
From: Groningen (NL)
Registered: 2004-10-19
Posts: 16
Website

Re: UPDATE: Don't do this :: Nested CSS files :: How to

Great, just what I needed to know! Thanx


“Bartender, a bit of advice. Always inspect a jukebox carefully.
These machines can be deadly.” — Adam West, the Original Batman

Offline

#3 2006-05-18 12:48:53

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: UPDATE: Don't do this :: Nested CSS files :: How to

Wonderful, I was looking for something like this. Thank you!

Offline

#4 2006-05-18 18:34:06

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: UPDATE: Don't do this :: Nested CSS files :: How to

This works well and in many cases can greatly increase maintainability. One caveat – be very careful as the C is CSS stands for cascading and if you don’t pay attention to how subsequently imported sheets modify things on previous imports you can get some very, ummmm, unusual behaviour :-)

edited for the inevitable typos

Last edited by NyteOwl (2006-05-18 18:35:52)


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#5 2006-05-18 18:37:10

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: UPDATE: Don't do this :: Nested CSS files :: How to

Good point, mrOwl. I usually start basic and then go more specific.

Offline

Board footer

Powered by FluxBB