#2885 - Split the global.css file

This is a spacer post for a website comment topic. The content this topic relates to: #2885 - Split the global.css file
I probably put it like it is to minimise the number of included CSS files. But we could rearchitect it to have a file that is explicitly defined as only loaded during Tempcode compilation but not by the browser.
I'm extending this idea to make it easier to customise CSS without having to override the actual bundled CSS files. We can do that by including extra CSS code from an additional file at the end of each file. This will solve our long-running "theme bugfixes/changes don't get applied to Theme Wizard themes" issue we've had, and obviate our need to make a complex patch applier.

TODO...

Move colours to new _colors.css file
Move responsive modes stuff (in hybrid responsive branch) to new _responsive.css file
At top of global.css change comment to say colours are in _colors.css file
And also mention that every CSS file by default includes a <file>__extensions.css file
Search for code that references global.css and in some cases change to _colors.css
Search for code that references 'global' and in some cases change to '_colors'
For each CSS file add an include to the <file>__extensions CSS file on the bottom
And include a comment at the top recommending to add changes to the <file>__extensions file, even if the changes are to undo our own rules
Add all new CSS files to addon registry hooks
Remove the theme wizard inclusion-style method (not needed anymore)
...and make sure it is not documented
Test that now the Theme Wizard ends up only creating a single CSS file, _colors.css
Create and document some Tempcode for laying out substitutions on the CSS file that was just generated (so you can remove or replace chunks of default CSS without having to edit it)

I'm going to incorporate this into a new "theme tooling improvements" issue, as it ties in with other changes.
0 guests and 0 members have recently viewed this.