Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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:- Create an empty master CSS stylesheet
- Create categorized child CSS stylesheets, ie -navigation, -type, -position
- 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
- 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
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
Re: UPDATE: Don't do this :: Nested CSS files :: How to
Good point, mrOwl. I usually start basic and then go more specific.
Offline