-
Notifications
You must be signed in to change notification settings - Fork 15
/
tailwind.config.js
47 lines (44 loc) · 1.2 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
const defaultTheme = require('tailwindcss/defaultTheme')
const plugin = require('tailwindcss/plugin')
const Color = require('color')
module.exports = {
darkMode: 'class',
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./public/**/*.html',
],
theme: {
extend: {
screens: {
'xs': '425px',
},
colors: {
primary: '#23925C',
secondary: '#1D6944',
transparent: 'transparent',
white: '#ffffff',
black: '#000000',
},
fontFamily: {
sans: ['Open Sans', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/line-clamp'),
plugin(({ addUtilities, e, theme, variants }) => {
const newUtilities = {}
Object.entries(theme('colors')).map(([name, value]) => {
if (name === 'transparent' || name === 'current') return
const color = value[300] ? value[300] : value
const hsla = Color(color).alpha(0.45).hsl().string()
newUtilities[`.shadow-outline-${name}`] = {
'box-shadow': `0 0 0 3px ${hsla}`,
}
})
addUtilities(newUtilities, variants('boxShadow'))
}),
],
}