From 6f018578034ad7503e508fb7ae3e69582b507a37 Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 19 Dec 2021 18:20:23 +0900 Subject: [PATCH] code highlighting css improvement - added code highlighting for light theme - cleaned code block css --- source/src/styles/globalStyle.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/src/styles/globalStyle.tsx b/source/src/styles/globalStyle.tsx index 72f04b3..d75bcd5 100644 --- a/source/src/styles/globalStyle.tsx +++ b/source/src/styles/globalStyle.tsx @@ -66,17 +66,20 @@ const codeCSS = css` light: "1px solid #BBB", dark: "1px solid #555", })}; - padding: 1em 1.5em; - overflow: auto; - display: block; - word-wrap: break-word; - page-break-inside: avoid; line-height: 1.6; border-radius: 0.5rem; + padding: 0; + display: flex; } + /* // todo: fix highlight not working properly when scrolled horizontally // */ .highlighted-line { - background-color: #14161a; + background-color: ${(props) => + theming.theme(props.theme.currentTheme, { + light: "#dddddd", + dark: "#14161a", + })}; + display: block; width: 100%; margin: 0 -1rem;