From 671c529ee2056f20c073e1899044fb116f81e537 Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 26 Mar 2022 17:50:18 +0900 Subject: [PATCH] prevented text overflowing on small displays - set `word-wrap` to `break-word` --- src/styles/globalStyle.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/styles/globalStyle.tsx b/src/styles/globalStyle.tsx index 48812ef..5e44450 100644 --- a/src/styles/globalStyle.tsx +++ b/src/styles/globalStyle.tsx @@ -85,8 +85,10 @@ const codeCSS = css` } }} + /* line code */ :not(pre) > code { font-family: ${theming.font.code}; + word-wrap: break-word; color: ${(props) => theming.theme(props.theme.currentTheme, { light: theming.light.color1, @@ -106,6 +108,7 @@ const codeCSS = css` padding: 0 3px; } + /* code block */ pre > code { font-family: ${theming.font.code}; border: ${(props) =>