This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 471
/
theme.ts
145 lines (143 loc) · 3.28 KB
/
theme.ts
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import { extendTheme } from '@chakra-ui/react'
const customTheme = extendTheme({
config: {},
semanticTokens: {
colors: {
// accent semantic tokens
accent: { default: 'teal.500', _dark: 'teal.300' },
'accent-emphasis': { default: 'teal.700', _dark: 'teal.200' },
'accent-static': 'teal.500',
'accent-muted': { default: 'teal.300', _dark: 'teal.200' },
'accent-subtle': { default: 'teal.50', _dark: 'teal.800' },
// foreground semantic tokens
fg: { default: 'gray.700', _dark: 'gray.100' },
'fg-emphasis': { default: 'gray.900', _dark: 'gray.200' },
'fg-muted': { default: 'gray.600', _dark: 'gray.400' },
'fg-subtle': { default: 'gray.500', _dark: 'gray.300' },
'fg-on-accent': { default: 'white', _dark: 'inherit' },
},
},
fonts: {
heading: 'Inter, sans-serif',
body: 'Inter, sans-serif',
},
styles: {
global: {
body: {
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
color: 'fg',
'.deleted': {
color: '#ff8383 !important',
fontStyle: 'normal !important',
},
'.inserted': {
color: '#b5f4a5 !important',
fontStyle: 'normal !important',
},
},
},
},
textStyles: {
heading: {
fontFamily: 'heading',
textAlign: 'center',
fontWeight: 'bold',
letterSpacing: '-0.015em',
lineHeight: '1.24',
fontSize: { base: '2rem', md: '3.5rem' },
},
'heading-2': {
fontFamily: 'heading',
textAlign: 'center',
fontWeight: 'bold',
letterSpacing: '-0.015em',
lineHeight: '1.24',
fontSize: { base: '1.75rem', md: '2.75rem' },
},
caps: {
textTransform: 'uppercase',
fontSize: 'sm',
letterSpacing: 'widest',
fontWeight: 'bold',
},
},
mdx: {
h1: {
mt: '2rem',
mb: '.25rem',
lineHeight: 1.2,
fontWeight: 'bold',
fontSize: '1.875rem',
letterSpacing: '-.025em',
},
h2: {
mt: '4rem',
mb: '0.5rem',
lineHeight: 1.3,
fontWeight: 'semibold',
fontSize: '1.5rem',
letterSpacing: '-.025em',
'& + h3': {
mt: '1.5rem',
},
},
h3: {
mt: '3rem',
lineHeight: 1.25,
fontWeight: 'semibold',
fontSize: '1.25rem',
letterSpacing: '-.025em',
},
h4: {
mt: '3rem',
lineHeight: 1.375,
fontWeight: 'semibold',
fontSize: '1.125rem',
},
a: {
color: 'accent',
fontWeight: 'semibold',
transition: 'color 0.15s',
transitionTimingFunction: 'ease-out',
_hover: {
color: 'teal.600',
},
},
p: {
mt: '1.25rem',
lineHeight: 1.7,
'blockquote &': {
mt: 0,
},
},
hr: {
my: '4rem',
},
blockquote: {
bg: 'orange.100',
borderWidth: '1px',
borderColor: 'orange.200',
rounded: 'lg',
px: '1.25rem',
py: '1rem',
my: '1.5rem',
},
ul: {
mt: '0.5rem',
ml: '1.25rem',
'blockquote &': { mt: 0 },
'& > * + *': {
mt: '0.25rem',
},
},
code: {
rounded: 'sm',
px: '1',
fontSize: '0.875em',
py: '2px',
lineHeight: 'normal',
},
},
})
export default customTheme