Why not add the style.css from current Theme to the CssBundle?

Topics: Controls
Jan 21, 2012 at 2:09 PM

In the current Version you're using a new kind of JS and css optimization.
So why you don't add the the CSS file from the current theme to the Bundle? You could do it very easy with two lines of code in the BlogBasePage class:

After the loop through the Loader.Styles entries simply add:

css.Add("~/themes/" + BlogSettings.Instance.Theme + "/style.css");
rndCss += "_t";

Just my 2 cents.

Jan 21, 2012 at 2:32 PM
Edited Jan 21, 2012 at 2:37 PM

Thanks Klaus. Current code is work in progress, we not settled yet on final approach and experimenting with different optimization options comparing and testing a lot. With your code, it would be ok for most themes but keep in mind that some can have multiple stylesheets and some will use unconventional naming. Stylesheet for standard theme will be using "recommended" technique to combine/minify, we just not there yet.

Jan 21, 2012 at 2:44 PM

Thanks for your quick reply.
I've realized, the current code is work in progress.

After a first look into the BlogBasePage class I see you're adding the QuickNotes to the Css Bundle but not the current theme style. So I did a quick test and it works like a charm.
I keep an eye on the BlogBasePage and will see whats going on in future change sets.