From 852adc0f1c9e444ce67111e6fbf0c0a9b7d9b906 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Wed, 13 Jan 2021 23:22:41 +0100 Subject: [PATCH] Update global styles --- components/GlobalStyles.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/GlobalStyles.tsx b/components/GlobalStyles.tsx index 78fea5e..57ffd5d 100644 --- a/components/GlobalStyles.tsx +++ b/components/GlobalStyles.tsx @@ -14,13 +14,20 @@ const Global = createGlobalStyle` font-size: 17px; line-height: 1.5; outline: none; + user-select: text; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); + + &::selection { + background: ${({ dark, theme }) => (dark ? theme.colors.dark.text : theme.colors.light.text)}; + color: ${({ dark, theme }) => + dark ? theme.colors.dark.background : theme.colors.light.background}; + } } body { background: ${({ dark, theme }) => dark ? theme.colors.dark.background : theme.colors.light.background}; - color: ${({ dark, theme }) => (dark ? theme.colors.dark.text : theme.colors.light.text)}; + 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; }