forked from emotion-js/emotion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal-styles.tsx
34 lines (32 loc) · 903 Bytes
/
global-styles.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
import { Global, css } from '@emotion/react'
import { ReactElement } from 'react'
import { colors, draculaPrism } from '../util'
const globalCss = css({
':root': {
'--background-color': '#ffffff',
'--text-color': '#000000',
'--link-color': colors.pink,
'--link-hover-color': colors.hightlight,
},
'.dark': {
'--background-color': '#121212',
'--text-color': '#ffffff',
'--link-color': colors.pink, // Adjust if different in dark mode
'--link-hover-color': colors.hightlight, // Adjust if different in dark mode
},
body: {
backgroundColor: 'var(--background-color)',
color: 'var(--text-color)',
},
a: {
color: colors.pink,
textDecoration: 'none'
},
'a:hover': {
color: colors.hightlight,
textDecoration: 'underline'
}
})
export function GlobalStyles(): ReactElement {
return <Global styles={[draculaPrism, globalCss]} />
}