From c72daca7a5519059afcb3f37ace1e75c1db2e8ff Mon Sep 17 00:00:00 2001 From: vihar Date: Thu, 23 Jul 2026 20:31:00 +0530 Subject: [PATCH] fix: use neutral inline code color and explicit github syntax themes for readability --- docs/.vitepress/config.mts | 4 ++++ docs/.vitepress/theme/styles.css | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 9569573..7d2ce70 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -56,6 +56,10 @@ export default extendConfig( withMermaid( defineConfig({ markdown: { + theme: { + light: "github-light", + dark: "github-dark", + }, config(md) { md.use(tabsMarkdownPlugin); }, diff --git a/docs/.vitepress/theme/styles.css b/docs/.vitepress/theme/styles.css index 77209c0..5315de9 100644 --- a/docs/.vitepress/theme/styles.css +++ b/docs/.vitepress/theme/styles.css @@ -97,6 +97,11 @@ html:not(.dark):not([data-theme="dark"]) { --color-plane-500: #006399; --color-plane-600: #005280; + /* Inline code — neutral body-text color instead of the VitePress default + (brand blue), which is hard to read on the dark pill background. + Linked code keeps --vp-code-link-color (brand) so links stay visible. */ + --vp-code-color: var(--vp-c-text-1); + --docs-divider: #ececec; --vp-c-bg: #ffffff; @@ -158,7 +163,7 @@ html:not(.dark):not([data-theme="dark"]) { :root[data-variant="voidzero"]:not(.dark):not([data-theme="dark"]), :root[data-variant="vitest"]:not(.dark):not([data-theme="dark"]) { --color-brand: #006399; - --vp-code-color: #006399; + --vp-code-color: var(--vp-c-text-1); } /* --- Dark mode --- */