So this one is really just to get other skinner's opinions on the core DNN classes... My vote is to get rid of the ugly critters sooner rather than later - they're an absolute headache!
Think of this scenario:
A client of ours insiste that we style all our text using em's. No problem... Well, not in straight HTML, anyway... DNN, however, is a totally different kettle of hamburgers.
For those of you who don't know, an em ("M') is a relative unit of measurement. By relative, we mean relative to the M height of a font set. And then a specified size is in turn relative to the containing wrapper's em value. So, for example, if you set the body's base size to 0.625 (or 62.5%) you end up with a base size of 10px. Read more about this here. Then if you want all your
P's base size to be 14px, you simply say font-size: 1.4em; etc, etc... Simple when you know how...
But the .Normal class, for example, is EVERYWHERE... And .Normal has a default size, and is injected everywhere by DNN's core - on Divs, on P's, etc, etc. Also, .Head is injected as a default class on all container titles... This presents a problem.
Consider styling an H2 container title, wrapped in a div with the class .container-title-wrapper...
.container-title-wrapper {
font-size: 20em;
}
easy... But DNN adds a to the text (which is fine) but with the class of .Head..! And as head is commonly used throughout as a core style, it needs a base size. If it has a base size of 1.6em, then the following is the markup...
<div class="container-title-wrapper"><h1><span class="head" id="dnn_ctr???_dnnTITLE_lblTitle">The
Title of this container</span></h1></div>
But .Head is already set to 1.6em in skin.css (as it's a default style). So 20em (for the H1) X 1.6 = 26em for the title... Ridiculous... You have to unwrite everything!
Also, what about .CommandButton and .SkinObject - why not just leave them as straight tags...?I know Cuong Dang has commented on this before on DNNGallery.net, and I know that Timo has created the UnloadCSS skinobject, but I feel there's no point in unloading a stylesheet when the class is still injected (e.g. Normal and Head) and needs to be supported. This is something that really needs to be addressed...
Some might say, "What about legacy installations of DNN..?" Well... It's about time for an upgrade... Older sites can stay as they are...
Your thoughts, comments, suggestions...