Reputation: 5530
DotNetNuke uses quite a few preset classes like .Normal, .Head, .SubHead, etc. in spans inside other classless spans etc. that I find really annoying and rather than figuring out how to work with them I'm considering overriding them by having them all inherit their styles from their parent, but I'm curious if others have already given this a try and have stories to tell of success or fallen foul of something on the module / admin end that makes this a fruitless task?
Thanks, Steve
Upvotes: 2
Views: 374
Reputation: 7672
I would add another stylesheet that appends or overrides the default styles. This way, you can recast the default styles without editing the default stylesheet.
Use the cascading nature of CSS to your favor!
In cases where styles are new, make sure to namespace them with an outside container.
Upvotes: 0
Reputation: 16954
This really depends on your project. If you're developing a commercial product, my recommendation is to learn how to work with the styles so that you have high compatibility with the DotNetNuke core as well as third party extensions (skins & modules).
I would say if you have complete control over the site it may well be worth it to you to follow your own conventions and bypass the DNN selectors altogether.
That approach would be to create skins and containers that define regions with specific class names. You could then define styles for elements within those regions based on what the element actually is rather than what class is applied to it.
You will probably want to clean up or remove the contents of the default.css file as well (\portals_default\default.css).
Upvotes: 1