-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
102 lines (99 loc) · 2.46 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
93
94
95
96
97
98
99
100
101
102
/* eslint-disable @typescript-eslint/no-var-requires */
const { colors, screens, maxWidth, spacing } = require('tailwindcss/defaultTheme');
const { sharedTheme } = require('./tailwind.shared.js');
module.exports = {
theme: {
screens: {
xsm: '480px',
...screens,
...sharedTheme.screens,
},
spacing: {
...spacing,
...sharedTheme.spacing,
},
colors: {
...colors,
primary: 'var(--color-primary)',
secondary: 'var(--color-secondary)',
background: 'var(--color-background)',
},
aspectRatio: {
square: [1, 1],
'16/9': [16, 9],
'4/3': [4, 3],
'21/9': [21, 9],
},
maxWidth: {
...maxWidth,
...sharedTheme.maxWidth,
'1/4': '25%',
'1/2': '50%',
'3/4': '75%',
},
},
variants: {
zIndex: ['responsive', 'focus'],
borderStyle: ['responsive', 'focus'],
borderWidth: ['responsive', 'focus'],
},
plugins: [
require('tailwindcss-aspect-ratio')(),
function({ addUtilities }) {
const newUtilities = {
// Contain
'.contain-strict': {
contain: 'strict',
},
'.contain-layout-paint': {
contain: 'layout paint',
},
'.contain-paint': {
contain: 'paint',
},
'.contain-layout': {
contain: 'layout',
},
// Transition
'.transition-tf-custom': {
transitionTimingFunction: 'cubic-bezier(0.175, 0.85, 0.42, 0.96)',
},
'.transition-d-100': {
transitionDuration: '0.1s',
},
'.transition-d-150': {
transitionDuration: '0.15s',
},
'.transition-d-200': {
transitionDuration: '0.2s',
},
'.transition-d-300': {
transitionDuration: '0.3s',
},
'.transition-d-500': {
transitionDuration: '0.5s',
},
'.transition-p-opacity': {
transitionProperty: 'opacity',
},
'.transition-p-opacity-transform': {
transitionProperty: 'opacity, transform',
},
'.transition-inherit': {
transition: 'inherit',
},
// Transform
'.transform-scale-up': {
transform: 'scale(1.05)',
},
'.transform-scale-down': {
transform: 'scale(0.96)',
},
'.transform-none': {
transform: 'none',
},
};
addUtilities(newUtilities, ['responsive', 'focus']);
},
],
};