From 31ade8ab8266ee776f0f12538e1f5d40ce145421 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Tue, 12 Jan 2021 23:27:52 +0100 Subject: [PATCH] Add styled scrollbar and update text line height --- components/GlobalStyles.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/GlobalStyles.tsx b/components/GlobalStyles.tsx index 230bdf0..78fea5e 100644 --- a/components/GlobalStyles.tsx +++ b/components/GlobalStyles.tsx @@ -12,6 +12,7 @@ const Global = createGlobalStyle` box-sizing: border-box; font-family: 'Source Code Pro', monospace; font-size: 17px; + line-height: 1.5; outline: none; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } @@ -21,6 +22,15 @@ const Global = createGlobalStyle` dark ? theme.colors.dark.background : theme.colors.light.background}; color: ${({ dark, theme }) => (dark ? theme.colors.dark.text : theme.colors.light.text)}; transition: color 250ms ease-in-out, background 250ms ease-in-out; + scroll-behavior: smooth; + } + + body::-webkit-scrollbar { + width: 0.5rem; + } + + body::-webkit-scrollbar-thumb { + background-color: ${({ dark, theme }) => (dark ? theme.colors.dark.text : theme.colors.light.text)}; } `;