From c36a85733d885d1099ba15605e5e1ff83e60a8d3 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Fri, 10 Sep 2021 15:53:47 +0200 Subject: [PATCH] Fixes #132017 by resolving style conflicts for ghost text. --- src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts b/src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts index 764b426c1c9..7c2785e536b 100644 --- a/src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts +++ b/src/vs/editor/contrib/inlineCompletions/ghostTextWidget.ts @@ -497,9 +497,10 @@ registerThemingParticipant((theme, collector) => { const opacity = String(foreground.rgba.a); const color = Color.Format.CSS.format(opaque(foreground))!; - collector.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${opacity}; color: ${color}; }`); - collector.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${foreground.toString()}; }`); - collector.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${opacity}; color: ${color}; }`); + // `!important` ensures that other decorations don't cause a style conflict (#132017). + collector.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${opacity} !important; color: ${color} !important; }`); + collector.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${foreground.toString()} !important; }`); + collector.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${opacity} !important; color: ${color} !important; }`); } const border = theme.getColor(ghostTextBorder); -- GitLab