-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
84 lines (80 loc) · 1.91 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
const plugin = require('tailwindcss/plugin');
const arg = (argList => {
let arg = {},
a, opt, thisOpt, curOpt;
for (a = 0; a < argList.length; a++) {
thisOpt = argList[a].trim();
opt = thisOpt.replace(/^\-+/, '');
if (opt === thisOpt) {
if (curOpt) arg[curOpt] = opt;
curOpt = null;
} else {
curOpt = opt;
arg[curOpt] = true;
}
}
return arg;
})(process.argv);
// -- Environment configuration.
const isProd = arg.production === true;
module.exports = {
purge: {
enabled: isProd ? true : false,
content: ['./src/public/**/*.html', './src/assets/js/**/*.js']
},
future: {
removeDeprecatedGapUtilities: false,
purgeLayersByDefault: true,
applyComplexClasses: true
},
theme: {
screens: {
sm: '640px', // -- mobile
md: '768px', //-- tablet small
lg: '992px', //-- tablet large
xl: '1200px', //-- laptop
xxl: '1600px', //-- desktop large
},
fontFamily: {
display: ['Montserrat'],
heading: ['Montserrat'],
body: ['Work Sans']
},
extend: {},
},
corePlugins: {
container: false, //-- disable default Tailwind container.
},
variants: {},
plugins: [
plugin(function({ addUtilities }) {
const container = {
'.container': {
maxWidth: '100%',
padding: '0 1.25rem',
'@screen sm': {
maxWidth: '100%',
padding: '0 1.25rem',
},
'@screen md': {
maxWidth: '688px',
padding: '0',
},
'@screen lg': {
maxWidth: '864px',
padding: '0',
},
'@screen xl': {
maxWidth: '1140px',
padding: '0',
},
'@screen xxl': {
maxWidth: '1350px',
padding: '0',
},
}
};
addUtilities(container, ['responsive']);
})
],
};