Maintenance: Refactor CSS & Themes - #2092
Merged
Merged
Conversation
Jixabon
marked this pull request as ready for review
April 5, 2026 15:20
Member
Contributor
Author
|
I missed updating what it'll set as the default theme. It should ignore any values that aren't in the list of themes gracefully and set it to default. |
Member
Contributor
Author
|
Looks like I missed that too 😂🤦. Just a visual check looks good. Expected behavior is the theme index (eg 'default') in the 'theme' cookie and the theme value (array) from the list in the session 'theme'. |
Member
Member
Disregard! I see now that this is already done 😅 |
Member
|
This (and the Insiders PR) are looking good to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR revamps the css and theme system while adding system color scheme support.
Adds Theme controls to the System->Theme page for transparent control.
Updates functions with better naming with takeaways from #2088 as well as addresses the feature request in #2087
The
base.cssfile should be strictly used for styles that establish strucutre and layout to the pages and elements. There is light theming in this file simply to make things "functional". In theory the theme stylesheets should be able to be removed and everything should still work/look as intended.The
app/css/themescontains the two included themes. Each theme file should include styles for both light and dark mode using the data attributehtml[data-bs-theme="dark"]to apply them.Where to put new styles
A comment based structure has been introduced to the stylesheets (the following) to better reduce dead classes and/or redundant styles. This structure should ideally exist for both light and dark styles.
Custom Theme
To add a custom theme simply put the stylesheet in the
/app/css/themesdirectory. Putting it in this director is not a requirement but is just where the other themes are stored. If it is put in a different location then be sure to set it in the theme definition. Then update the themes variables in two spots:app/js/ui/main.jsandincludes/defaults.php. Use the below format to define the theme.or for javascript
Dead Styles?
The following styles were removed due to there being no apparent application for them. If this is in error please make note of this in a comment.