From e182dafeac69d13bb2fd19f8b4ac8b7f56b56cae Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 27 Mar 2023 20:03:42 -0400 Subject: [PATCH] fix: Improve readability of inline code in dark theme closes #5096 --- shared/editor/components/Styles.ts | 10 +++------- shared/styles/theme.ts | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index 779ad2f526..36f7dbe2e7 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -63,12 +63,7 @@ math-inline .math-render { math-inline .math-src .ProseMirror { display: inline; - border-radius: 4px; - border: 1px solid ${props.theme.codeBorder}; - padding: 3px 4px; margin: 0px 3px; - font-family: ${props.theme.fontFamilyMono}; - font-size: 80%; } math-block { @@ -85,7 +80,7 @@ math-block.ProseMirror-selectednode { background: ${props.theme.codeBackground}; padding: 0.75em 1em; font-family: ${props.theme.fontFamilyMono}; - font-size: 80%; + font-size: 90%; } math-block .math-src .ProseMirror { @@ -876,13 +871,14 @@ hr.page-break:before { border-top: 1px dashed ${props.theme.horizontalRule}; } +.math-inline .math-src .ProseMirror, code { border-radius: 4px; border: 1px solid ${props.theme.codeBorder}; background: ${props.theme.codeBackground}; padding: 3px 4px; font-family: ${props.theme.fontFamilyMono}; - font-size: 80%; + font-size: 90%; } mark { diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts index 76f94cfc34..9fc5687c31 100644 --- a/shared/styles/theme.ts +++ b/shared/styles/theme.ts @@ -229,7 +229,7 @@ export const buildDarkTheme = (input: Partial): DefaultTheme => { quote: colors.almostWhite, code: colors.almostWhite, codeBackground: colors.black75, - codeBorder: colors.black50, + codeBorder: colors.white10, codeString: "#3d8fd1", embedBorder: colors.black50, horizontalRule: lighten(0.1, colors.almostBlack),