Closed msujew closed 2 years ago
I'm strongly in favor. I believe that we could implement high-contrast theming without this, but doing so would require creating separate CSS files for all HC theme effects and dynamically loading and unloading them (we have a similar mechanism in place in our variables-light.useable.css
and variables-dark.useable.css
), but I believe that this style of contribution would be much more flexible and transparent.
Feature Description:
VSCode allows fine-grained CSS control using the
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => void)
method. In particular, it allows to set/change CSS rules depending on the currently selected theme colors.I believe that this is a missing piece in our framework to implement https://github.com/eclipse-theia/theia/issues/6743. In a recent PR I encountered an CSS
outline
property, which would only work if the currently selected theme is a high contrast theme. In every other case it would lead to unexpected effects. So we definitely have a need to be able to control CSS rules in a more fine-grained way than currently possible.In the spirit of DI and extensibility, my proposal would be to have something like a
ThemingParticipant
contribution provider which fulfills the same purpose as VSCode'sregisterThemingParticipant
. However, I would like to hear the opinions of other contributors on that matter.