-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
75 lines (71 loc) · 2.12 KB
/
tailwind.config.js
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
const { fontFamily } = require('tailwindcss/defaultTheme');
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
theme: {
fontFamily: {
...fontFamily,
sans: ['Inter', ...fontFamily.sans],
},
extend: {
typography: (theme) => ({
DEFAULT: {
css: {
color: theme('colors.gray.700'),
pre: {
fontSize: '1rem',
background: '#202026',
padding: '1.125rem 0',
lineHeight: 1.6,
// https://github.com/atomiks/rehype-pretty-code/blob/36946fbc0318cbae176642becb5d6cbcb390324c/website/tailwind.config.js#L100
'> code': {
display: 'grid',
'.word': {
background: 'rgba(200,200,255,0.15)',
padding: '0.25rem',
borderRadius: '0.25rem',
},
'> .line': {
padding: '0 1.25rem',
borderLeft: `2px solid transparent`,
},
'> .line.line--highlighted': {
background: 'rgba(200, 200, 255, 0.1)',
borderLeftColor: theme('colors.blue.400'),
},
},
},
':not(pre) > code': {
background: 'rgba(200,200,255,0.1)',
padding: '0.25rem',
borderRadius: '0.25rem',
},
},
},
dark: {
css: {
color: theme('colors.gray.200'),
'h2, h3, h4': {
color: theme('colors.gray.100'),
},
'code, blockquote': {
color: theme('colors.gray.200'),
},
},
},
}),
keyframes: {
heading: {
'0%': { backgroundPosition: '0 50%' },
'50%': { backgroundPosition: '100% 50%' },
'100%': { backgroundPosition: '0 50%' },
},
},
animation: {
heading: 'heading 10s linear infinite',
},
},
},
plugins: [require('@tailwindcss/typography')],
};