The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
@import or <link>? - CSS
Discuss @import or <link>? - CSS in the CSS Help forum on Dev Shed. @import or <link>? - CSS Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 10th, 2002, 07:51 AM
|
 |
cosmos curator
|
|
Join Date: Mar 2002
Location: Leeds, UK
Posts: 678
  
Time spent in forums: 1 Day 14 h 17 m 49 sec
Reputation Power: 13
|
|
|
@import or <link>? - CSS
I've been looking over CSS tutorials, articles, and other miscellaneous bumf, and I just happened to be wondering...
What is the preferred or correct way to import style sheets: @import or <link>?
I know that the @import rule under windows can have a strange side-effect of 'flashing' the unstyled content of the page before reflowing. So why use this, and not <link>?
Is this something to do with standards (  not again, that terrible yet wonderous word), or just down to the coding preference of the developer?
Comments and thoughts please ppl 
__________________
R.T.F.M - Its the only way to fly...
"No matter what you do, or how good it is, someone will always ask for more features. Or to change the colour of something, then change their minds."
Personal:
experience// 8 Years Web Development
technologies// Standards-compliant, valid, & accessible (x)HTML/CSS, XML/XSL/XPath/XQuery/XUpdate, (OOP) PHP/(My)SQL, eXist/Xindice/XMLDBs
packages// Photoshop, Illustrator, Flash/Fireworks/Director
environment// FC2, MySQL, Lighttpd, PHP5, Mojavi/Agavi
site// //refactored.net/ (Coming soon...)
quote// Programming is the eternal competition between programmers who try to make apps more and more idiot proof and the universe that makes dumber idiots. So far, the universe is winning...
|

December 10th, 2002, 08:28 AM
|
 |
mod_dev_shed
|
|
Join Date: Sep 2002
Location: Atlanta, GA
|
|
|
I'm new to using @import too, but it's my understanding that @import is similar to an `include`. So let's say you default.css which only contains site wide fonts and default colors, then you have more specific stylesheets that would @import this default stylesheet, instead of repeating the style declaration or using multiple <link> statements.
<link> is used within HTML, @import is used within the stylesheet itself.
I'm sure someone will correct me if I understood all of this incorrectly.
__________________
# Jeremy
Explain your problem instead of asking how to do what you decided was the solution.
|

December 10th, 2002, 09:44 AM
|
 |
|<.+#f@#+.&.|
|
|
Join Date: Mar 2002
Location: norway
|
|
|

December 10th, 2002, 11:44 AM
|
 |
cosmos curator
|
|
Join Date: Mar 2002
Location: Leeds, UK
Posts: 678
  
Time spent in forums: 1 Day 14 h 17 m 49 sec
Reputation Power: 13
|
|
|
Thats what i mean, the "flash"ing of content before the style is applied. Surely it would be better to just use <link> to avoid this bug?
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|