#3361 - Improving CSS and JavaScript maintenance
0 guests and 0 members have recently viewed this.
The top 3 point earners from 7th Dec 2025 to 14th Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| Master Rat |
|
|
There are no events at this time
Possibly for .php overrides too, but I do worry more about performance there.
I've done things a bit differently...
Instead of _colours.css and _responsive.css, there is just _base.css. No need for two.
This is loaded via PHP logic, rather than INCLUDEs. Cleaner, as it is needed by any CSS file.
There are, however, some _*_colours.css files that are done via includes, for addon-specific colours.
The whole system of extensions is changed significantly.
We are trying to solve two problems:
1) Allow overrides to minimally specify their changes, to make upgrading easier
2) Allowing multiple addons to override the same files, to avoid conflict
The extension system would have involved a lot of extra files and complexity and impacted performance.
So instead for (1), I've improved the INCLUDE directive a lot. It can do the same kinds of substitutions discussed here for the extension files. It's nice to extend our existing functionality rather than create something new.
To solve (2), I've created a new system called 'contentious hooks'. These may alter PHP code files, .ini files, and templates. It's nice because the hooks directory needs only scanning once, rather than looking for extension files for each individual file being loaded.
All in all, this is simpler and cleaner, and works great.