From b9c5cf90ec196b1b6a5a998fa330df89a2e348ec Mon Sep 17 00:00:00 2001 From: CES1919 <85708292+CES1919@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:46:58 +0800 Subject: [PATCH 1/2] style: improve inline codespan contrast in markdown --- src/app.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app.css b/src/app.css index 5eea66bebca..6de9cce92f4 100644 --- a/src/app.css +++ b/src/app.css @@ -334,7 +334,17 @@ input[type='number'] { .codespan { padding: 0.15rem 0.3rem; font-size: 0.85em; - @apply font-mono rounded-md text-gray-800 bg-gray-100 dark:text-gray-200 dark:bg-gray-800 mx-0.5; + @apply font-mono rounded-md font-semibold mx-0.5; + /* Keep inline code readable even when external markdown themes set low-contrast code colors. */ + color: rgb(17 24 39) !important; /* gray-900 */ + background-color: rgb(229 231 235) !important; /* gray-200 */ + border: 1px solid rgb(209 213 219); /* gray-300 */ +} + +.dark .codespan { + color: rgb(243 244 246) !important; /* gray-100 */ + background-color: rgb(55 65 81) !important; /* gray-700 */ + border-color: rgb(75 85 99); /* gray-600 */ } .svelte-flow { From 268dbc16dec6305f251a2daf2ddc1a8eeb78720e Mon Sep 17 00:00:00 2001 From: CES1919 <85708292+CES1919@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:00:20 +0800 Subject: [PATCH 2/2] style: set codespan text to pure black for readability --- src/app.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index 6de9cce92f4..100d4231fbe 100644 --- a/src/app.css +++ b/src/app.css @@ -336,13 +336,17 @@ input[type='number'] { font-size: 0.85em; @apply font-mono rounded-md font-semibold mx-0.5; /* Keep inline code readable even when external markdown themes set low-contrast code colors. */ - color: rgb(17 24 39) !important; /* gray-900 */ + color: rgb(0 0 0) !important; /* pure black */ + -webkit-text-fill-color: rgb(0 0 0) !important; + opacity: 1 !important; background-color: rgb(229 231 235) !important; /* gray-200 */ - border: 1px solid rgb(209 213 219); /* gray-300 */ + border: 1px solid rgb(156 163 175); /* gray-400 */ } .dark .codespan { color: rgb(243 244 246) !important; /* gray-100 */ + -webkit-text-fill-color: rgb(243 244 246) !important; + opacity: 1 !important; background-color: rgb(55 65 81) !important; /* gray-700 */ border-color: rgb(75 85 99); /* gray-600 */ }