2022-12-08 12:14:18 +08:00
|
|
|
import { css, Global } from '@emotion/react';
|
|
|
|
import React from 'react';
|
2023-08-22 17:48:53 +08:00
|
|
|
import { useTheme } from 'antd-style';
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2023-08-22 17:48:53 +08:00
|
|
|
export default () => {
|
|
|
|
const { headerHeight, margin } = useTheme();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Global
|
|
|
|
styles={css`
|
2022-12-19 13:23:28 +08:00
|
|
|
body,
|
|
|
|
div,
|
|
|
|
dl,
|
|
|
|
dt,
|
|
|
|
dd,
|
|
|
|
ul,
|
|
|
|
ol,
|
|
|
|
li,
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6,
|
|
|
|
pre,
|
|
|
|
code,
|
|
|
|
form,
|
|
|
|
fieldset,
|
|
|
|
legend,
|
|
|
|
input,
|
|
|
|
textarea,
|
|
|
|
p,
|
|
|
|
blockquote,
|
|
|
|
th,
|
|
|
|
td,
|
|
|
|
hr,
|
|
|
|
button,
|
|
|
|
article,
|
|
|
|
aside,
|
|
|
|
details,
|
|
|
|
figcaption,
|
|
|
|
figure,
|
|
|
|
footer,
|
|
|
|
header,
|
|
|
|
hgroup,
|
|
|
|
menu,
|
|
|
|
nav,
|
|
|
|
section {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
ul,
|
|
|
|
ol {
|
|
|
|
list-style: none;
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2022-12-19 13:23:28 +08:00
|
|
|
img {
|
|
|
|
vertical-align: middle;
|
|
|
|
border-style: none;
|
|
|
|
}
|
2023-08-22 17:48:53 +08:00
|
|
|
|
|
|
|
html {
|
|
|
|
scroll-padding-top: ${headerHeight + margin}px;
|
|
|
|
}
|
2023-09-02 12:17:20 +08:00
|
|
|
|
|
|
|
[data-prefers-color='dark'] {
|
|
|
|
color-scheme: dark;
|
|
|
|
}
|
2022-12-19 13:23:28 +08:00
|
|
|
`}
|
2023-08-22 17:48:53 +08:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|