-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
62 lines (59 loc) · 1.77 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
const plugin = require('tailwindcss/plugin')
const CONTAINER_WIDTH = 90
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
primary: '#FFF8F0',
secondary: '#02030A',
accent: '#C79C6B',
danger: '#ff5555'
},
fontFamily: {
body: ['Prompt', 'sans-serif'],
heading: ['Emberly', 'serif']
},
extend: {
spacing: (theme) => {
const containerOuside = `calc((100vw - ${CONTAINER_WIDTH}) / 2))`
const maxWidth =
parseInt(theme('screens.2xl').match(/(\d)+/)[0]) / 2
return {
'container-outside': containerOuside,
'container-outside-max': `max(${containerOuside}, ${maxWidth})`
}
}
}
},
variants: {
extend: {},
container: []
},
plugins: [
plugin(({ addComponents, addUtilities }) => {
addComponents([
{
'.container': {
// maxWidth: theme('screens.2xl'),
width: `min(100%, ${CONTAINER_WIDTH}vw)`,
marginLeft: 'auto',
marginRight: 'auto'
}
}
])
addUtilities([
{
'.bg-conic-gradient': {
backgroundImage: `conic-gradient(from 180deg at 50% 100%, var(--tw-gradient-from), var(--tw-gradient-to))`
}
}
])
})
],
corePlugins: {
container: false
}
}