-
Notifications
You must be signed in to change notification settings - Fork 123
/
tailwind.config.js
68 lines (66 loc) · 1.65 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
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';
const round = num =>
num
.toFixed(7)
.replace(/(\.[0-9]+?)0+$/, '$1')
.replace(/\.0$/, '');
const em = (px, base) => `${round(px / base)}em`;
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
fontFamily: {
sans: ['Jost', 'system-ui']
},
extend: {
typography: {
DEFAULT: {
css: {
h2: {
fontSize: em(20, 14),
marginTop: em(32, 20),
marginBottom: em(4, 20),
lineHeight: round(28 / 20)
},
blockquote: {
fontWeight: 'normal',
fontStyle: 'normal',
color: '',
borderLeftWidth: '0.25rem',
borderLeftColor: 'var(--tw-prose-quote-borders)',
quotes: ''
},
'blockquote p:first-of-type::before': {
content: ''
},
'blockquote p:last-of-type::after': {
content: ''
}
}
},
lg: {
css: {
h2: {
fontSize: em(30, 18),
marginTop: em(56, 30),
marginBottom: em(4, 20),
lineHeight: round(40 / 30)
}
}
},
xl: {
css: {
h2: {
fontSize: em(30, 18),
marginTop: em(56, 30),
marginBottom: em(4, 20),
lineHeight: round(40 / 30)
}
}
}
}
}
},
plugins: [forms, typography]
};