Skip to content

[Bug]: DnnCssInclude stylesheet load order is different in DNN 10 #7335

Description

@Timo-Breumelhof

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I created a test theme where it included this:

<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<dnn:DnnCssInclude runat="server" FilePath="Base/Skin.css" PathNameAlias="SkinPath" />

I noticed that there are significant differences between in the theme looks in DNN 9 vs 10.

dnn 9:

Image

dnn 10:

Image

You can see here that on DNN 10 default.css overrules the theme.
This is due to the style sheet load order being incorrect in DNN 10.

dnn 9:

Image Loaded after portal.css

dnn 10:

Image

Loaded as the first style sheet before default.css which causes the styling difference.

If you add an order to the SKO, you get this in DNN 10:

<dnn:DnnCssInclude runat="server" FilePath="Base/Skin.css" Priority="45" PathNameAlias="SkinPath" />

Image

Steps to reproduce?

Add this to a Theme and inspect style sheet load order in the HTML head

<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>


<dnn:DnnCssInclude runat="server" FilePath="Base/Skin.css" PathNameAlias="SkinPath" />

Current Behavior

Stylesheet load order is different in DNN 9 and 10

Expected Behavior

There should not be a difference between DNN 9 and 10 in this regard.

Relevant log output

Anything else?

No response

Affected Versions

10.3.2 (latest release)

What browsers are you seeing the problem on?

Firefox

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions