generated from bossoq/simple-sveltekit-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.cjs
56 lines (53 loc) · 1.37 KB
/
tailwind.config.cjs
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
/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin')
module.exports = {
content: ['./src/**/*.{html,js,svelte,ts}'],
darkMode: 'class',
theme: {
extend: {
colors: {
'blue-light-key': '#41bfd0',
'blue-dark-key': '#1e3d59',
'green-light-key': '#60ceb0'
},
animation: {
fadeIn: 'fadeIn 0.4s ease-in-out',
fadeOut: 'fadeOut 0.4s ease-in-out'
},
keyframes: {
fadeIn: {
'0%': { opacity: 0 },
'100%': { opacity: 1 }
},
fadeOut: {
'0%': { opacity: 1 },
'100%': { opacity: 0 }
}
}
}
},
plugins: [
plugin(function ({ addUtilities }) {
addUtilities({
'.hide-scrollbar': {
'scrollbar-width': 'none',
'-ms-overflow-style': 'none'
},
'.hide-scrollbar::-webkit-scrollbar': {
display: 'none'
}
})
}),
require('vidstack/tailwind.cjs')({
prefix: 'media',
webComponents: true
}),
customVariants
]
}
function customVariants({ addVariant, matchVariant }) {
// Strict version of `.group` to help with nesting.
matchVariant('parent-data', (value) => `.parent[data-${value}] > &`)
addVariant('hocus', ['&:hover', '&:focus-visible'])
addVariant('group-hocus', ['.group:hover &', '.group:focus-visible &'])
}