#2885 - Split the global.css file
| Identifier | #2885 |
|---|---|
| Issue type | Trivial issue (does not break functionality) |
| Title | Split the global.css file |
| Status | Closed (duplicate) |
| Tags |
Risk: General incompatibility (custom) |
| Handling member | Chris Graham |
| Addon | core_themeing |
| Description | I find it difficult to use the global.css file across multiple themes because the global.css file contains not only global CSS classes, but also the theme colors. As a result, if I wish to edit a global.css class to take effect on all themes, I have to edit each individual theme's global.css file. This is a time consuming task.
Instead, split the CSS file into two separate files. Global.css, which does not contain any theme color data, and is specific to default theme (thus global for all themes) unless a user specifically edits it and makes a custom override. Then make another css file (maybe "theme.css" or something) that contains just the theme colors etc. And this css file is specific to each theme. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Comments
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)