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, ...Using @importUsing @import
Previous
 
Next
New Post
4/3/2008 2:44 PM
 

I am having a problem overwriting the default.css file that is used by the Events Calendar (\desktopmodules\events\themes\default\default.css).  The problem is the default.css file used by that module has !important sprinkled throughout.  So when I try to overwrite it in the skin.css, it is ignored.  I have been reading up on my inheritance, etc and found that if I import a style it will overwrite the !important used in the default.  However, when I try to use the @import in my html file, DNN just ignores it. 

So my question is two fold, how do you use @import and get DNN to recognize or how do I overwrite the default.css used by the Events Calendar without actually changing that file?  I do not want to have to go back everytime we upgrade and remake those changes.

 
New Post
4/3/2008 6:21 PM
 

skin.css should be loaded after any module.css, so you should be able to overwrite the values if you add the CSS there

 
New Post
4/4/2008 12:18 PM
 

That is actually what I thought and what I did originally.  However since the default.css file in the themes directory is using !important, my styles in the skin.css are not overwriting them.  The module.css file is called but is empty.

 
New Post
4/4/2008 2:27 PM
 

Timo Breumelhof wrote

skin.css should be loaded after any module.css, so you should be able to overwrite the values if you add the CSS there

I have the same exact problem. Unfortuneately, I am looking at a core DNN module (in my case the Calendar module). It gets its style from the default.css class. When you read the rules for CSS (see below), you discover that the web browser deals with cascade conflicts by assigning weight to CSS classes. The root class is known as the author class - in this case it is the default.css class in DNN. There is no reason that anyone should EVER use "!important" in a default class unless you are positive that you NEVER want anyone to be able to overwrite your default definition. Even though this hard and fast rule has changed in recent years, many web applications are, unfortunately, behind the times and impliment older CSS standards. Since that seems to be the case here, DNN default skins and CSS classes should avoid the use of "!important".

For more about assigning property values, cascading, and inheritance please reference the following web page.

www.w3.org/TR/REC-CSS2/cascade.html

The use of the "!important" argument in the default.css class tells me that the original designers aren't really up to speed on the changes in CSS and didn't really adhear to the guiding standards upon which CSS was built in the first place. The only answer I have been able to come up with is to edit the default.css file and keep a change file that I need to merge every time I upgrade. It isn't the best solution, but its a good work around until the DNN dev team can correct this oversite and once again begin adhering to the standard.

Cheers!


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
4/4/2008 3:12 PM
 

Dawn Fink wrote: how do I overwrite the default.css used by the Events Calendar without actually changing that file?

You don't have to use the Default theme (and with it the default.css). In the module settings you can select one of the other pre-installed themes (FixedBlue, Small, ...). And you can easily create your own themes - just copy one the existing ones, rename the folder and the .css file in it to the desired theme name! The next time you edit the module settings, the new theme will be available in the "Theme/Skin" select  box. AFAIK custom themes are not overwritten when upgrading.

Hope that helps!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Using @importUsing @import


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