-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
84 lines (82 loc) · 1.98 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
/* eslint-disable node/no-unpublished-require */
/* eslint-disable node/no-missing-require */
// eslint-disable-next-line node/no-extraneous-require
const selectorParser = require('postcss-selector-parser');
module.exports = {
future: {
// removeDeprecatedGapUtilities: true,
// purgeLayersByDefault: true,
},
purge: [],
theme: {
extend: {
fontFamily: {
mont: ['Montserrat', 'sans-serif'],
fira: ['"Fira Sans"', 'Helvetica', 'sans-serif'],
lato: ['Lato', 'Helvetica', 'sans-serif'],
},
fontSize: {
'7xl': '5.25rem',
'8xl': '6.5rem',
'9xl': '8rem',
'10xl': '10rem',
},
},
},
variants: {
textColor: ['dark', 'dark-hover', 'responsive', 'hover', 'focus'],
backgroundColor: ['dark', 'dark-hover', 'responsive', 'hover', 'focus'],
},
corePlugins: {
container: false,
},
plugins: [
require('@tailwindcss/typography'),
({addComponents, theme}) => {
addComponents({
'.container': {
margin: 'auto',
padding: theme('spacing.6'),
maxWidth: theme('maxWidth.full'),
// Breakpoints
'@screen sm': {
maxWidth: theme('maxWidth.xl'),
},
'@screen md': {
maxWidth: theme('maxWidth.2xl'),
},
'@screen lg': {
maxWidth: theme('maxWidth.4xl'),
},
'@screen xl': {
maxWidth: theme('maxWidth.6xl'),
},
},
});
},
({addVariant, prefix}) => {
addVariant('dark', ({modifySelectors, separator}) => {
modifySelectors(({selector}) => {
return selectorParser(selectors => {
selectors.walkClasses(sel => {
sel.value = `dark${separator}${sel.value}`;
sel.parent.insertBefore(
sel,
selectorParser().astSync(prefix('.dark-theme '))
);
});
}).processSync(selector);
});
});
},
({addVariant, e}) => {
addVariant('dark-hover', ({modifySelectors, separator}) => {
modifySelectors(({className}) => {
return `.dark-theme .${e(
`dark:hover${separator}${className}`
)}:hover`;
});
});
},
],
};