From 818775a12b216fd35a03e992ff12565cc3d1d41d Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 18 Mar 2025 06:45:29 -0700 Subject: [PATCH] Dark mode: increase code contrast --- src/modules/blocks/blocks.styles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/blocks/blocks.styles.ts b/src/modules/blocks/blocks.styles.ts index e5d097876..43872007d 100644 --- a/src/modules/blocks/blocks.styles.ts +++ b/src/modules/blocks/blocks.styles.ts @@ -18,7 +18,8 @@ export function useScaledCodeSx(fromAssistant: boolean, contentScaling: ContentS : themeScalingMap[contentScaling]?.blockCodeMarginY ?? 0, backgroundColor: codeRenderVariant === 'plain' ? 'background.surface' - : fromAssistant ? 'neutral.plainHoverBg' : 'primary.plainActiveBg', // could use plainActiveBg to increase the background contrast in dark mode (#631), but it's really too bright in that case + : fromAssistant ? 'background.level1' // was 'neutral.plainHoverBg', turned to background.level1 to improve the dark mode contrast while keeping light the same + : 'primary.plainActiveBg', // could use plainActiveBg to increase the background contrast in dark mode (#631), but it's really too bright in that case boxShadow: codeRenderVariant === 'plain' ? undefined : 'inset 2px 0px 5px -4px var(--joy-palette-background-backdrop)', // was 'xs'