@import in skin.css
Last Post 04/10/2008 3:14 AM by Lee Sykes. 1 Replies.
Author Messages
Chuck Rizzio
Nuker
Nuker
Posts:13


--
04/09/2008 11:14 AM  
Any particular reason why the @import does not work if you try to use it in the skin.css?

I use Eric Myer's reset stylesheet.  Here's the link for anyone interested.

Well i have @import url(reset.css) at the toppity toppest of my skin.css file and it isnt recognized.  I ended up just slapping it in to the skin.css and everything worked fine.

Recently, for straight html/css brochure sites I use multiple stylesheets and link them with the @import.

For example:  a site may have 2 or 3 "layouts" which I will identify with a specific stylesheet (i.e. 2col.css, 3col.css, etc.)

then in the 2col.css i will import reset.css, type.css, color.css, etc....

I have found this is RIDICULOUSLY convenient for when you want to go in and edit existing sites and would LOVEEEEEEEEEEE if someone could let me know if achieving this same process is possible.

I do know of the skinname.css technique, but would like to take it a bit further.

Thanks in advance.
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
04/10/2008 3:14 AM  
hello,

I have used the  @import function on DNN creative, have a look at the CSS code. I have applied the @import on the default.CSS file, an example you can see here:


@import "http://www.dnncreative.com/Portals/...ultdnn.css";
@import "http://www.dnncreative.com/Portals/...kinall.css";
@import "http://www.dnncreative.com/Portals/_default/Skins/07/print.css";
/* to have valid CSS, @imports need to be in first CSS file read, so these are placed in the default.css file
and then we call up the various files we require. - Note in each of these files is then a media type */

/* Use this to call in IE5.x/Win iehacks.css file */
@media tty {
 i{content:"\";/*" "*/}} @import 'iehacks.css'; /*";}
}/* */


You will notice that I have specified the full URL for each of the CSS files.

The one problem with using @import  is that the W3C validators are not keen on it.

Hope this helps, thanks,
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile


---