Skip to content

Commit

Permalink
Fixed: #5978 support theming-webview-content
Browse files Browse the repository at this point in the history
Signed-off-by: MiaoWoo <admin@yumc.pw>
  • Loading branch information
502647092 committed Aug 21, 2019
1 parent 2d4c845 commit 3bc2fc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/plugin-ext/src/main/browser/webviews-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(<HTMLElement>styleElement, this.themeRulesService.getCurrentThemeRules());
contentDocument.body.className = `vscode-${ThemeService.get().getCurrentTheme().id}`;
}));
}
},
Expand Down

0 comments on commit 3bc2fc7

Please sign in to comment.