Custom theming

Does anyone have experience making a custom theme?

I’m playing around with trying to access the ThemeManager from an extension, but what I’m seeing at runtime is a subset of the class defined here: (using ThemeService.get()). Specifically the “register” method isn’t there. I also tried creating a new ThemeService, as that seems like it’ll override the existing one, but the constructor is protected. Maybe there’s an example out there where someone has done this?

[original thread by Ben Sidelinger]

We are reworking the theming at the moment.
You should closely follow

[Ben Sidelinger]

Awesome! I just looked and it seems like that is pretty close. Thanks @svenefftinge

@ben-sidelinger I will write down in CHANGELOG how to register new color themes. For file icon themes one has to use VS Code extensions for now.

@ben-sidelinger here is a summary of how custom color theme can be registered: Does it answer your question? Do you want to customize something else expect colors?

[Ben Sidelinger]

Thanks @anton-kosyakov this totally answers my question. I’m also customizing the top menu, but that’s already possible with a MenuContribution. We also make some layout changes, but are doing that just fine now by requiring a css file from our extension, since this gets loaded last by style-loader we can override things pretty easily. That is somewhat brittle cuz it’ll break if we take an update of theia in which css class names on the DOM change, but once we have the this change it’ll boil down to just a couple sizing/spacing css rules for us and we’re willing to re-write the selectors if need be on a version bump. So all in all this gets us really close to where we need to be in a very native way, and we still have a path for those edge cases.

@ben-sidelinger sounds good! hope we don’t break css class names too often