-
Notifications
You must be signed in to change notification settings - Fork 193
/
tailwind.config.js
181 lines (179 loc) · 5.1 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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
const defaultTheme = require('tailwindcss/defaultTheme')
const {spacing} = require('tailwindcss/defaultTheme')
const containerStylesPlugin = ({addComponents}) =>
addComponents({
'.container': {
maxWidth: '1280px',
},
})
module.exports = {
darkMode: 'class',
content: ['./src/**/*.{js,ts,tsx,mdx}'],
theme: {
container: {
center: true,
padding: {
DEFAULT: '1rem',
md: '1.5rem',
},
},
extend: {
colors: {
transparentLight: 'rgba(255, 255, 255, 0)', // safari fix
transparentDark: 'rgba(17, 24, 39, 0)', // safari fix
gray: {...defaultTheme.colors.gray, 1000: '#0A0F19'},
},
boxShadow: {
smooth:
'0 4.5px 3.6px -8px rgba(0, 0, 0, 0.01), 0 12.5px 10px -8px rgba(0, 0, 0, 0.015), 0 30.1px 24.1px -8px rgba(0, 0, 0, 0.02), 0 100px 80px -8px rgba(0, 0, 0, 0.03)',
},
typography: (theme) => ({
default: {
css: {
color: theme('colors.black'),
code: {
padding: '3px 5px',
borderRadius: 5,
background: theme('colors.gray.100'),
},
h1: {
fontSize: theme('fontSize.3xl'),
lineHeight: theme('lineHeight.tight'),
fontWeight: theme('fontWeight.bold'),
},
h2: {
fontSize: theme('fontSize.xl'),
lineHeight: theme('lineHeight.snug'),
fontWeight: theme('fontWeight.bold'),
},
h3: {
fontSize: theme('fontSize.lg'),
lineHeight: theme('lineHeight.normal'),
fontWeight: theme('fontWeight.extrabold'),
},
'h2,h3,h4': {
'scroll-margin-top': spacing[32],
},
mark: {
background: theme('colors.pink.100'),
},
},
},
dark: {
css: {
color: theme('colors.white'),
blockquote: {
borderLeftColor: theme('colors.gray.700'),
color: theme('colors.gray.100'),
},
h1: {
color: theme('colors.white'),
},
'h2,h3,h4': {
color: theme('colors.white'),
'scroll-margin-top': spacing[32],
},
code: {
padding: '3px 5px',
borderRadius: 5,
color: theme('colors.white'),
background: theme('colors.gray.800'),
},
'pre > code': {
background: 'none',
padding: 0,
},
hr: {borderColor: theme('colors.gray.700')},
strong: {color: theme('colors.white')},
thead: {
color: theme('colors.gray.100'),
},
tbody: {
tr: {
borderBottomColor: theme('colors.gray.700'),
},
},
mark: {
background: theme('colors.yellow.100'),
},
},
},
}),
screens: {
xs: '375px',
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
'2xl': '1440px',
'3xl': '1920px',
print: {raw: 'print'},
},
fontSize: {
// Set in Major Third typescale (1.25)
base: '1rem',
lg: '1.25rem',
xl: '1.563rem',
'2xl': '1.953rem',
'3xl': '2.441rem',
'4xl': '3.052rem',
'5xl': '3.815rem',
},
lineHeight: {
tighter: 1.1,
},
animation: {
'gradient-x': 'gradient-x 10s ease infinite',
'gradient-y': 'gradient-y 10s ease infinite',
'gradient-xy': 'gradient-xy 10s ease infinite',
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
keyframes: {
'accordion-down': {
from: {height: '0'},
to: {height: 'var(--radix-accordion-content-height)'},
},
'accordion-up': {
from: {height: 'var(--radix-accordion-content-height)'},
to: {height: '0'},
},
'gradient-y': {
'0%, 100%': {
'background-size': '400% 400%',
'background-position': 'center top',
},
'50%': {
'background-size': '200% 200%',
'background-position': 'center center',
},
},
'gradient-x': {
'0%, 100%': {
'background-size': '200% 200%',
'background-position': 'left center',
},
'50%': {
'background-size': '200% 200%',
'background-position': 'right center',
},
},
'gradient-xy': {
'0%, 100%': {
'background-size': '400% 400%',
'background-position': 'left center',
},
'50%': {
'background-size': '200% 200%',
'background-position': 'right center',
},
},
},
},
},
plugins: [
containerStylesPlugin,
require('@tailwindcss/typography'),
require('@tailwindcss/forms'),
],
}