From 5f1bd3550a9cc8a88f3fdd855ca247d8c03830c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Thu, 11 Jul 2024 22:38:26 +0800 Subject: [PATCH] =?UTF-8?q?enhance(style):=E6=81=A2=E5=A4=8D=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E5=BD=A2=E5=BC=8F=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global-style.tsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/global-style.tsx b/src/global-style.tsx index 46a2545..210d8d0 100644 --- a/src/global-style.tsx +++ b/src/global-style.tsx @@ -2,20 +2,20 @@ import { css } from "@emotion/react"; import { mq } from "./style-predefines"; export const globalStyle = (theme) => - css` - :root { - color-scheme: light dark; - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 0.625; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; - background-color: ${theme.backgroundColor.light}; - overflow: hidden; - ${mq.dark} { - background-color: ${theme.backgroundColor.dark}; - } - } - `; + css({ + [":root"]: { + colorScheme: "light dark", + fontFamily: "Inter, Avenir, Helvetica, Arial, sans-serif", + fontSize: 0.625, + fontSynthesis: "none", + textRendering: "optimizeLegibility", + WebkitFontSmoothing: "antialiased", + MozOsxFontSmoothing: "grayscale", + WebkitTextSizeAdjust: "100%", + backgroundColor: theme.backgroundColor.light, + overflow: "hidden", + [mq.dark]: { + backgroundColor: theme.backgroundColor.dark, + }, + }, + });