-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtailwind.config.cjs
61 lines (60 loc) · 2.1 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
57
58
59
60
61
const plugin = require('tailwindcss/plugin');
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{html,js,svelte,ts}'],
plugins: [
require('daisyui'),
require('vidstack/tailwind.cjs')({
// Change the media variants prefix.
prefix: 'media',
// Enables more efficient selectors.
webComponents: true
}),
require('tailwindcss-scoped-groups')({
groups: ['one', 'two']
}),
plugin(function ({ matchUtilities, theme }) {
// https://stackoverflow.com/a/73165741
matchUtilities(
{
'translate3d-x': value => ({
'--tw-translate-x': value,
'--tw-translate-x': 0,
'--tw-translate-y': 0,
transform: `translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))`
}),
'translate3d-y': value => ({
'--tw-translate-x': 0,
'--tw-translate-y': value,
'--tw-translate-z': 0,
transform: `translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))`
}),
'translate3d-z': value => ({
'--tw-translate-x': 0,
'--tw-translate-y': 0,
'--tw-translate-z': value,
transform: `translate3d(var(--tw-translate-x), var(--tw-translate-y), var(--tw-translate-z)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))`
})
},
{ values: theme('translate'), supportsNegativeValues: true }
);
})
],
theme: {
extend: {
keyframes: {
shine: {
to: {
'background-position-x': '-200%;'
}
}
},
animation: {
'loading-card': 'shine 1.5s linear infinite'
}
}
},
daisyui: {
themes: false
}
};