Replies: 1 comment 3 replies
-
|
default.css has a lot of history. Back in the old days, it was best practice to limit the number of files at the cost of larger files. And a lot was put into default.css for that reason. It grew and grew with the addition of jquery plugins and telerik controls. In DNN 8, default.css was revamped slightly but then never loaded by default, upon the first releases of DNN8, there was so many breaking css changes that affected so many instances, that until DNN10, the default.css from version 7 was still the one loaded by default. In DNN 10 I did the first step of trying to improve the situation by:
There is still a lot of stuff in it that should be move into other components/modules as they are not always needed unless those components/modules are displayed. Modern protocols (HTTP2 with HTTPS) will actually perform better with smaller files loading in parallel just as needed. I think any effort in that direction would be welcome but documenting it or simply doing it should be the same amount of work. If you have time to submit PRs that go in that direction, I think they would be welcomed improvements as long as they don't break existing sites. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/dnnsoftware/Dnn.Platform/tree/develop/DNN%20Platform/Dnn.ClientSide
First of all, I really appreciate the initiative behind the
Dnn.ClientSidepackage. It’s a great step forward.However, I believe it would be extremely beneficial if the creator/maintainers could provide a detailed README.md. We need a clear vision and roadmap so that contributors (myself included) can align our efforts and follow a unified direction. Specifically, I am concerned about avoiding the "bloat" often seen in default.css if we don't have strict guidelines.
I would like to propose a discussion regarding the CSS Loading Strategy:
default.css: We need to define exactly what belongs here.Proposal: Only essential styles that are required for every page load (e.g., basic typography, Login control styles) should be in default.css. Everything else should be moved out to avoid increasing the initial payload size for anonymous users.
admin.css:Proposal: This file should contain styles for DNN specific controls and administrative features.
Loading logic: It should be loaded automatically upon successful login.
Exception handling: For specific cases where anonymous users need these styles (e.g., an anonymous "Contact Us" form using complex input controls), the specific Module or Skin should explicitly request to load admin.css, rather than forcing it into default.css.
Conclusion: Could we establish a clear convention/guideline in the README? Contributors need to know strictly: "If I add this feature, does its style go into default.css or admin.css?"
This will help keep the core lightweight and the codebase organized.
Beta Was this translation helpful? Give feedback.
All reactions