-
Notifications
You must be signed in to change notification settings - Fork 547
/
Copy pathBaseStyles.tsx
36 lines (30 loc) · 899 Bytes
/
BaseStyles.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { Global, css } from '@emotion/react';
import React from 'react';
import tw, { GlobalStyles } from 'twin.macro';
const customStyles = css`
@import url(https://cdn.jsdelivr.net/gh/tonsky/FiraCode@5.2/distr/fira_code.css);
body {
font-family: 'Fira Code VF', 'Segoe UI', 'Consolas', 'monospace', 'Microsoft YaHei';
font-variant-ligatures: normal;
background-size: 32px 32px;
background-image: radial-gradient(rgba(59, 130, 246, 0.2) 1px, rgba(59, 130, 246, 0) 0px);
${tw`overflow-y-scroll antialiased`}
${tw`bg-slate-50 text-slate-900`}
${tw`dark:bg-black dark:text-slate-400`}
}
*::-webkit-scrollbar {
${tw`w-2 h-2`}
}
*::-webkit-scrollbar-thumb {
${tw`bg-slate-200 dark:bg-slate-700`}
}
`;
function BaseStyles() {
return (
<>
<GlobalStyles />
<Global styles={customStyles} />
</>
);
}
export default BaseStyles;