enahcne(style):刷新样式定义。
This commit is contained in:
parent
f49d2fac85
commit
9297f574f4
|
@ -1,21 +1,33 @@
|
||||||
import { css } from "@emotion/react";
|
import { css, Theme } from "@emotion/react";
|
||||||
import { mq } from "./style-predefines";
|
import { mq } from "./style-predefines";
|
||||||
|
|
||||||
export const globalStyle = (theme) =>
|
export const globalStyle = (theme: Theme) => css`
|
||||||
css({
|
:root {
|
||||||
[":root"]: {
|
color-scheme: light dark;
|
||||||
colorScheme: "light dark",
|
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
|
||||||
fontFamily: "Inter, Avenir, Helvetica, Arial, sans-serif",
|
font-size: 0.625;
|
||||||
fontSize: 0.625,
|
font-synthesis: none;
|
||||||
fontSynthesis: "none",
|
text-rendering: optimizeLegibility;
|
||||||
textRendering: "optimizeLegibility",
|
-webkit-font-smoothing: antialiased;
|
||||||
WebkitFontSmoothing: "antialiased",
|
-moz-osx-font-smoothing: grayscale;
|
||||||
MozOsxFontSmoothing: "grayscale",
|
-webkit-text-size-adjust: 100%;
|
||||||
WebkitTextSizeAdjust: "100%",
|
color: ${theme.foregroundColor.light};
|
||||||
backgroundColor: theme.backgroundColor.light,
|
background-color: ${theme.backgroundColor.light};
|
||||||
overflow: "hidden",
|
overflow: hidden;
|
||||||
[mq.dark]: {
|
height: 100vh;
|
||||||
backgroundColor: theme.backgroundColor.dark,
|
width: 100vw;
|
||||||
},
|
${mq.dark} {
|
||||||
},
|
color: ${theme.foregroundColor.dark};
|
||||||
});
|
background-color: ${theme.backgroundColor.dark};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
height: inherit;
|
||||||
|
width: inherit;
|
||||||
|
overflow: hidden;
|
||||||
|
#root {
|
||||||
|
height: inherit;
|
||||||
|
width: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
|
@ -24,12 +24,12 @@ export const theme: Partial<Theme> = {
|
||||||
white: "#ffffff",
|
white: "#ffffff",
|
||||||
black: "#000000",
|
black: "#000000",
|
||||||
foregroundColor: {
|
foregroundColor: {
|
||||||
light: chroma.hsl(0, 0, 0.06).hex(),
|
light: chroma.hsl(0, 0, 0.12).hex(),
|
||||||
dark: chroma.hsl(0, 0, 0.88).hex(),
|
dark: chroma.hsl(0, 0, 0.82).hex(),
|
||||||
},
|
},
|
||||||
backgroundColor: {
|
backgroundColor: {
|
||||||
light: chroma.hsl(0, 0, 0.96).hex(),
|
light: chroma.hsl(0, 0, 0.94).hex(),
|
||||||
dark: chroma.hsl(0, 0, 0.18).hex(),
|
dark: chroma.hsl(0, 0, 0.098).hex(),
|
||||||
},
|
},
|
||||||
successColor: {
|
successColor: {
|
||||||
light: colors.green[5],
|
light: colors.green[5],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user