From 3bc2fc7bc454e64608997483e4ccbbfd5cc9dbb0 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Wed, 21 Aug 2019 10:53:20 +0800 Subject: [PATCH] Fixed: #5978 support theming-webview-content Signed-off-by: MiaoWoo --- packages/plugin-ext/src/main/browser/webviews-main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/plugin-ext/src/main/browser/webviews-main.ts b/packages/plugin-ext/src/main/browser/webviews-main.ts index 6c3ba9983560f..b2b8f45f2dfb1 100644 --- a/packages/plugin-ext/src/main/browser/webviews-main.ts +++ b/packages/plugin-ext/src/main/browser/webviews-main.ts @@ -101,8 +101,10 @@ export class WebviewsMainImpl implements WebviewsMain { } this.themeRulesService.setRules(styleElement, this.themeRulesService.getCurrentThemeRules()); + contentDocument.body.className = `vscode-${ThemeService.get().getCurrentTheme().id}`; toDispose.push(this.themeService.onThemeChange(() => { this.themeRulesService.setRules(styleElement, this.themeRulesService.getCurrentThemeRules()); + contentDocument.body.className = `vscode-${ThemeService.get().getCurrentTheme().id}`; })); } },