Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Which is better, skin.css or <skinname>.css?Which is better, skin.css or .css?
Previous
 
Next
New Post
2/7/2007 2:56 PM
 

I have been creating several sets of skins for a client and I have seen two different methods for naming the CSS file for either the skins and/or containers. I'm wondering if there is an advantage or limitations to one or the other.

1. Create a general container.css or skin.css that applies to all container/skin files in the set (i.e. if you have Home.ascx and Detail01.ascx).

2. Create a CSS file for each ascx (or html) file with the same basename as that file. (i.e. Home.ascx, Home.css, Detail01.ascx, Detail.css)

For me, the second method means a greater repetition of code and creates more work when a color or font or something else needs to be updated. But I have noticed some strange behavior when there is more than one skin set used on a site, or a container from a different skin set is used on a page with a different skin set to it (i.e. container from YourSkins is put on a page with MySkins applied as the page's skin).

Has anyone seen any problems with multiple generic skin.css files being pulled into the same portal, even though they have different paths? (i.e. Skins\YourSkins\skin.css and Skins\MySkins\skin.css) or even (Containers\YourSkins\container.css, Skins\MySkins\skin.css)

 
New Post
2/7/2007 3:19 PM
 

 

Skin.css is used for all skins in the skin folder.  Then you can use <skinName>.css to over-ride properties of skin.css or add aditional properties for different skins in the same skin folder, thereby taking advantage of the "C"  in CSS.

You have to pay careful attention to the order in which css files are added to the DOM which you can see by viewing the html source output of a page and searching for ".css".

Each .css file is cascaded (merged) together in the order you find them in the html for the final rendering in the browser.

 

 


DotNetNuke Modules from Snapsis.com
 
New Post
2/8/2007 6:21 PM
 
Can you control the order that the CSS files are added to the DOM? I realize that there is a set order for portal.css, default.css etc. But what about skin.css, skinname1.css, skinname2.css, etc.?
 
New Post
2/8/2007 7:09 PM
 
If you create a skin called myskin.html then only skin.css and myskin.css are loaded in this order.
myskin1.css would be ingnored and not loaded.
Don't think you can change the loadorder (unless you would start programming VB, or use javascript)
 
New Post
2/8/2007 7:15 PM
 

 

No you can't control it without changing the core code in the DNN skin engine.


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Which is better, skin.css or <skinname>.css?Which is better, skin.css or .css?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out