From 3ee3a41b6fabdedd6e892d98bfeec003e32292a6 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 5 Oct 2026 21:25:56 -0700 Subject: [PATCH] fix(markdown): strengthen dark table grid lines (#25653) Strengthen only dark-mode table cell borders in Markdown Preview and the rich editor by mixing foreground into the existing border token. Keep light mode and table geometry unchanged. Fixes #24982. Consolidates #24984, #25050, and #25653. Co-authored-by: Paramon Co-authored-by: kana001-bit <288527232+kana001-bit@users.noreply.github.com> Co-authored-by: Neil Co-authored-by: Claude Opus 5.5 (1M context) --- src/renderer/src/assets/markdown-preview.css | 7 +++++++ src/renderer/src/assets/rich-markdown-editor.css | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/renderer/src/assets/markdown-preview.css b/src/renderer/src/assets/markdown-preview.css index d68c356cdea..16c94834551 100644 --- a/src/renderer/src/assets/markdown-preview.css +++ b/src/renderer/src/assets/markdown-preview.css @@ -836,6 +836,13 @@ text-align: left; } +/* Why: --border is ~7% white in dark mode, so table grid lines are nearly invisible; + mix in foreground (~15% total) while keeping the border token role. */ +.dark .markdown-body th, +.dark .markdown-body td { + border-color: color-mix(in srgb, var(--foreground) 8%, var(--border)); +} + .markdown-body th { font-weight: 600; font-size: 0.85em; diff --git a/src/renderer/src/assets/rich-markdown-editor.css b/src/renderer/src/assets/rich-markdown-editor.css index ce59662d7f6..e476e2c5228 100644 --- a/src/renderer/src/assets/rich-markdown-editor.css +++ b/src/renderer/src/assets/rich-markdown-editor.css @@ -819,6 +819,13 @@ overflow-wrap: break-word; } +/* Why: --border is ~7% white in dark mode, so table grid lines are nearly invisible; + mix in foreground (~15% total) while keeping the border token role. */ +.dark .rich-markdown-editor th, +.dark .rich-markdown-editor td { + border-color: color-mix(in srgb, var(--foreground) 8%, var(--border)); +} + .rich-markdown-editor th { font-weight: 600; background: color-mix(in srgb, var(--foreground) 4%, transparent);