-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtailwind.config.js
92 lines (91 loc) · 2.09 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
import { colors } from './config'
const plugin = require('tailwindcss/plugin')
module.exports = {
important: true,
theme: {
extend: {
fontFamily: {
'pt-sans': [
'"PT Sans"',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
'Roboto',
'"Helvetica Neue"',
'Arial',
'sans-serif',
],
},
colors,
fontSize: {
xxs: '.6rem',
},
},
container: {
center: true,
padding: {
DEFAULT: '1rem',
sm: '2rem',
lg: '4rem',
xl: '5rem',
'2xl': '6rem',
},
},
},
variants: {
borderWidth: ['responsive', 'last', 'hover', 'focus'],
},
plugins: [
plugin(function ({ addBase, config }) {
addBase({
h1: { fontSize: config('theme.fontSize.4xl') },
h2: { fontSize: config('theme.fontSize.3xl') },
h3: { fontSize: config('theme.fontSize.xl') },
})
}),
require('@tailwindcss/typography'),
],
purge: {
content: [
`./public/**/*.html`,
'./src/**/*.vue',
'./src/**/*.js',
'./src/**/*.html',
'./src/**/*.md',
],
// These options are passed through directly to PurgeCSS
options: {
whitelist: [
'body',
'html',
'img',
'a',
'nuxt-progress',
'__nuxt',
'__layout',
],
whitelistPatterns: [
/-(leave|enter|appear)(|-(to|from|active))$/, // Normal transitions
/^nuxt-link(|-exact)-active$/, // Nuxt link classes
/^(?!cursor-move).+-move$/, // Move transitions
/data-v-.*/, // Keep scoped styles
],
extractors: [
{
extractor: (content) => {
const contentWithoutStyleBlocks = content.replace(
/<style[^]+?<\/style>/gi,
''
)
return (
contentWithoutStyleBlocks.match(
/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g
) || []
)
},
extensions: ['vue', 'js', 'md', 'html'],
},
],
},
},
}