From 71c527bc0f6d03aca5833fa4fa6223ce07182016 Mon Sep 17 00:00:00 2001 From: Cata Date: Mon, 12 Aug 2024 06:57:40 +0100 Subject: [PATCH] fix: improve readability of code elements in high-contrast themes (#508) --- CHANGELOG.md | 3 +++ media/views/oss/suggestion/suggestion.scss | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 040751c1b..fd5166c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Snyk Security Changelog +## [2.16.3] +- fix readability of `code` elements within the **overview** section when using high-contrast themes (both dark and light). Text color now matches the background. + ## [2.16.2] - updated the language server protocol version to 14 to support new communication model. diff --git a/media/views/oss/suggestion/suggestion.scss b/media/views/oss/suggestion/suggestion.scss index 956882cea..69308cb55 100644 --- a/media/views/oss/suggestion/suggestion.scss +++ b/media/views/oss/suggestion/suggestion.scss @@ -22,7 +22,7 @@ } .delimiter { - border-right:1px solid var(--vscode-input-border); + border-right: 1px solid var(--vscode-input-border); } .vulnerability-overview pre { @@ -37,3 +37,13 @@ font-size: var(--vscode-editor-font-size); font-family: var(--vscode-editor-font-family); } + +/* High-contrast dark mode */ +.vscode-high-contrast:not(.vscode-high-contrast-light) .vulnerability-overview code { + color: var(--vscode-editor-background); +} + +/* High-contrast light mode */ +.vscode-high-contrast.vscode-high-contrast-light .vulnerability-overview code { + color: var(--vscode-editor-background); +}