In a discussion about restoring access to Custom CSS/HTML fields in Discourse themes, denvergeeks shares a workaround: modifying the default theme, exporting it, editing about.json to mark it as a theme component, and re-uploading it as a .zip. This restores the missing CSS/HTML editor. JammyDodger suggests creating a local theme instead, since only remote themes lack the editor. merefield confirms this and recommends using Git for theme management, explaining version control benefits like rollback and collaboration. denvergeeks clarifies they only need minor CSS tweaks and finds Git intimidating. JammyDodger then suggests using a theme component—a lightweight, reusable module that can override any theme—which denvergeeks agrees is ideal. merefield adds that theme components always execute after themes, making them perfect for overrides, and advises keeping only the changes in the component to avoid redundancy [12]. pfaffman recommends the Discourse Theme CLI for easier theme development. The thread highlights practical, beginner-friendly solutions for minor styling tweaks without full theme development or Git.
Then, if you upload that .zip file as a theme or a theme component, you will get the Custom CSS/HTML fields that were removed from all but the default theme.
Theme development is not my forte, but could you not just create a new theme on your site to achieve a similar thing? It’s only the remote themes that don’t have the edit css/html button.
In order to manage the evolution of your Theme, just as with any code, it is good to use a system like Git(Hub) to control change.
This will allow you to track how the Theme evolves, easily roll back changes that don’t work or cause unexpected issues, mitigate loss of code (e.g. local corruption, loss of back-up). On the more advanced end, you can then also consider publishing your Theme to third parties and manage contribution via PR.
In this instance, I’m just wanting only to make super-minor CSS tweaks, not to establish or distribute a new theme.
For some unknown reason, the whole Git thing just scrambled-eggs my brain with a very unfortunate barrier (which I’m working hard to overcome!)
There might be others here in this community like me who (currently in their learning process) can only edit a certain amount of CSS which is only accessible through the Custom CSS/HTML settings in the default theme.