mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-10 12:34:32 +01:00
Fixes microsoft/monaco-editor#2660: If available, create a rule for default tokens using the editor.foreground and editor.background colors
This commit is contained in:
@@ -132,6 +132,19 @@ class StandaloneTheme implements IStandaloneTheme {
|
||||
encodedTokensColors = baseData.encodedTokensColors;
|
||||
}
|
||||
}
|
||||
// Pick up default colors from `editor.foreground` and `editor.background` if available
|
||||
const editorForeground = this.themeData.colors['editor.foreground'];
|
||||
const editorBackground = this.themeData.colors['editor.background'];
|
||||
if (editorForeground || editorBackground) {
|
||||
const rule: ITokenThemeRule = { token: '' };
|
||||
if (editorForeground) {
|
||||
rule.foreground = editorForeground;
|
||||
}
|
||||
if (editorBackground) {
|
||||
rule.background = editorBackground;
|
||||
}
|
||||
rules.push(rule);
|
||||
}
|
||||
rules = rules.concat(this.themeData.rules);
|
||||
if (this.themeData.encodedTokensColors) {
|
||||
encodedTokensColors = this.themeData.encodedTokensColors;
|
||||
|
||||
Reference in New Issue
Block a user