The default theme allows for custom CSS/HTML in its settings.
As an experiment, I wanted to hide the timeline, great suggestion for doing this using CSS was made (different topic). The suggestion was to implement the 4 lines as a theme component. Not difficult, but I thought the custom CSS option in the default theme might be easier.
I switched my theme and inserted the 4 lines as custom CSS. Indeed this worked perfectly.
This makes me wonder why this custom CSS/HTML is available (only) here. Wouldn’t it make more sense to have this as a general setting?
There is probably also a use for custom CSS only in a theme, but a general one would also be useful right?
EDIT: Just adding a link here to the main topic discussing custom CSS, which described the above “Default” theme approach: Make CSS changes on Your Site
Eh… no you don’t. Changes are on right away after saving.
First you were talking about general one, now you are editing directly just one theme. Well, if you are making changes just for one theme it would be nice if there would be an option per every theme. But when a CSS changes are in one component you can easily and fast disable it when (not if…) things goes to south because of bug, conflicts, upgrades…
For tryouts perhaps and if it doesn’t matter your users will see those tries too. But what if you like to keep that change and you have another theme to choose than just default one? Then you have to do another round
Why would you do that? Unless you are planning to share it. But no big deal — then you click update button of your component.
I’m a bit lost now. How would you put your CSS changes any easier into some global CSS-file (that would be a component too)?. What if you like to change theme Air, how did you thing you would deliver those changes?
You can’t edit the HTML and CSS of an “external” theme/component directly because changes would be overwritten when the theme/component is updated. It was still possible about two or three years ago, but this feature was removed.
You can create a local new component directly into Discourse’s interface to override the CSS of your existing theme (from the component’s CSS tab), or create a new component as a GitHub project that you will update through the component page (“update” button each time the repo is modified).
Do I understand well what you want to do and does this reply to your questions?
Hi @Canapin awesome! thank you. This is precisely what I was looking for.
This probably also explains the miscommunication with @Jagster, there is a direct way of doing what I was trying to do, but I wasn’t aware of this creating a new component directly from the interface (which allows custom CSS).
Maybe it would be useful to add this to the great guides on themes and/or CSS by @Johani