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);