forked from hipig/ddcard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
142 lines (137 loc) · 4.01 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
const plugin = require('tailwindcss/plugin')
const defaultTheme = require('tailwindcss/defaultTheme')
const colors = require('tailwindcss/colors')
module.exports = {
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./app/Models/*.php',
],
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
black: colors.black,
white: colors.white,
gray: colors.coolGray,
red: colors.red,
orange: colors.orange,
lime: colors.lime,
yellow: colors.yellow,
green: colors.emerald,
teal: colors.teal,
blue: colors.blue,
indigo: colors.indigo,
purple: colors.purple,
pink: colors.pink,
},
extend: {
fontFamily: {
sans: [
'Inter',
...defaultTheme.fontFamily.sans,
]
},
colors: {
'sidebar-dark': '#313947',
'sidebar-light': '#ffffff',
},
cursor: {
'resize-x': 'ew-resize',
},
maxWidth: {
'8xl': '90rem',
'9xl': '105rem',
'10xl': '120rem',
},
zIndex: {
'1': 1,
'60': 60,
'70': 70,
'80': 80,
'90': 90,
'100': 100,
},
typography: {
DEFAULT: {
css: {
a: {
textDecoration: 'none',
'&:hover': {
opacity: '.75',
},
},
img: {
borderRadius: defaultTheme.borderRadius.lg,
},
},
},
},
},
},
variants: {
extend: {
backgroundColor: ['active'],
backgroundOpacity: ['active'],
borderColor: ['active'],
boxShadow: ['active'],
opacity: ['active'],
rotate: ['active', 'group-hover'],
saturate: ['hover', 'focus', 'group-hover', 'group-focus'],
scale: ['active', 'group-hover'],
textColor: ['active'],
zIndex: ['hover', 'active'],
},
},
plugins: [
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/forms'),
require('@tailwindcss/typography')(),
plugin(function({ addUtilities }) {
const utilBgPatterns = {
'.pattern-dots-sm': {
'background-image': 'radial-gradient(currentColor 0.5px, transparent 0.5px)',
'background-size': 'calc(10 * 0.5px) calc(10 * 0.5px)',
},
'.pattern-dots-md': {
'background-image': 'radial-gradient(currentColor 1px, transparent 1px)',
'background-size': 'calc(10 * 1px) calc(10 * 1px)',
},
'.pattern-dots-lg': {
'background-image': 'radial-gradient(currentColor 1.5px, transparent 1.5px)',
'background-size': 'calc(10 * 1.5px) calc(10 * 1.5px)',
},
'.pattern-dots-xl': {
'background-image': 'radial-gradient(currentColor 2px, transparent 2px)',
'background-size': 'calc(10 * 2px) calc(10 * 2px)',
},
}
addUtilities(utilBgPatterns)
}),
plugin(function({ addUtilities }) {
const utilFormSwitch = {
'.form-switch': {
'border': 'transparent',
'background-color': colors.coolGray[300],
'background-image': "url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")",
'background-position': 'left center',
'background-repeat': 'no-repeat',
'background-size': 'contain !important',
'vertical-align': 'top',
'&:checked': {
'border': 'transparent',
'background-color': 'currentColor',
'background-image': "url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")",
'background-position': 'right center',
},
'&:disabled, &:disabled + label': {
'opacity': '.5',
'cursor': 'not-allowed',
},
},
}
addUtilities(utilFormSwitch)
}),
],
}