40FINGERS DNN Nederlands40FINGERS DNN English

Our Blog

Menu: Blog

Fixing DNN StyleSheet load order using StyleHelper 02.09.05

By: Timo Breumelhof
Fixing DNN StyleSheet load order using StyleHelper 02.09.05

One of the things that annoy me are DNN Extensions that don't comply with the Default DNN load order of Style Sheets.
This means NO Style-sheets should be loaded after Skin.css and Portal.css. The reason for this is that it allows us to overrule the design.
Unfortunately there are a lot of developers and even DNN core components that ignore this rule.

I have tried to move these Style-sheets with our the StyleHelper, but that did not work for all style sheets (it depends on when they get injected).
Today, I realized that there's a much smarter solution for this.
I introduce to you the "ForceSkinCssOrder" attribute in the 02.09.05 release of the Stylehelper.

It will set the priority of skin.css to 1000 and portal.css to 1001, moving then all the way to the end of the head, even if a developer does not care about style sheet order.


Download: https://stylehelper.codeplex.com/releases/view/631214