Old 14-10-2003, 10:08   #1 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
css @import

is it possible to import one stylesheet from another, rather than referencing many stylesheets in the header?
  Reply With Quote
Old 14-10-2003, 10:27   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
Quote:
Originally Posted by Brown
is it possible to import one stylesheet from another, rather than referencing many stylesheets in the header?

Yep.

You're linked style sheet on your page would look like
Code:
<link rel="stylesheet" type="text/css" href="/css/screen.css" />
And then screen.css would look like this
Code:
@import url("whatever.css"); @import url("whatever1.css"); @import url("whatever2.css"); @import url("whatever3.css");
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 14-10-2003, 10:27   #3 (permalink)
Mik
Magazines™
 
Mik's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,758
yeah mate like this

/*
Copyright (c) 2003 GDS Communications Ltd.

/* MAIN */

@import url(gds.css) print;
@import url(gds2.css) screen;
@import url(gds3.css) handheld;

etc
  Reply With Quote
Old 14-10-2003, 10:27   #4 (permalink)
Mik
Magazines™
 
Mik's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,758
arr huge quotes
  Reply With Quote
Old 14-10-2003, 10:30   #5 (permalink)
oli
I Call Shenanigans™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester, England.
Posts: 9,971
more fixes eh.
__________________
Linked In :: Last.fm :: Twitter me
..................
  Reply With Quote
Old 14-10-2003, 10:32   #6 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
we'll forget about media type for now.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 14-10-2003, 10:38   #7 (permalink)
Mik
Magazines™
 
Mik's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,758
haha
  Reply With Quote
Old 14-10-2003, 11:38   #8 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
cheers both. mik - your media type declaration doesn't seem to work.
  Reply With Quote
Old 14-10-2003, 11:50   #9 (permalink)
Mik
Magazines™
 
Mik's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,758
thats why we said leave it as ie 5/6 - cant remember which fucks up with it.

there are plenty of ways around it
  Reply With Quote
Old 14-10-2003, 12:26   #10 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
I meant I'll leave the media type out of the stylesheet link because it was causing the forum to stretch.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 10-03-2005, 13:41   #11 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
can i open this one again.

any limit? is this ridiculous:

@import url(cart2.css);
@import url(home.css);
@import url(h2milfs.css);
@import url(trackListingTable2.css);
@import url(subNavList.css);
@import url(invalidIEhacks.css);
@import url(trackMoreInfo.css);
@import url(genre.css);
@import url(registrationForm.css);
@import url(cartItems.css);
@import url(news.css);

it could grow.

and then, how about importing other stylesheets from within one of those?
  Reply With Quote
Old 10-03-2005, 13:47   #12 (permalink)
mike_m
Work faster microphone ..
 
mike_m's Avatar
 
Join Date: Feb 2003
Location: Dubai
Posts: 1,737
AFAIK you can do as many as you like - though I'm sure at some point it will have a negative effect on the initial load times - loading a 50k file is quicker than loading 50 1k files if you get my drift - though once everything is cached your golden. Might be worng though.
__________________
  Reply With Quote
Old 10-03-2005, 13:49   #13 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,563
Yeah, you can do all of that.

I reached about 20 once, got confused and decided I should have coded the css better.
  Reply With Quote
Old 10-03-2005, 13:50   #14 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,563
I mean reuse more classes etc.
  Reply With Quote
Old 10-03-2005, 13:58   #15 (permalink)
Mik
Magazines™
 
Mik's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,758
Quote:
Originally Posted by Mr Mik
thats why we said leave it as ie 5/6 - cant remember which fucks up with it.

there are plenty of ways around it

wtf is all this about then.

ahh before jaded stella memories.
  Reply With Quote
Old 10-03-2005, 13:59   #16 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
its already doing that, but if you've got a site with 30+ h2's, its nice to clear the 2 page scrolls of milfed background images to a seperate file, and i know where they all are.

is this or could it and how might it effect anything does anybody know?

i will find some time and experiment later. always later...
  Reply With Quote
Old 10-03-2005, 14:03   #17 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,563
Its fine.
  Reply With Quote
Old 10-03-2005, 14:11   #18 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
ok. thanks.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8