enhance(style):恢复对象形式的样式定义。

This commit is contained in:
徐涛 2024-07-11 22:38:26 +08:00
parent 1aab4c2f35
commit 5f1bd3550a

View File

@ -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,
},
},
});