forked from codante-io/mp-toggle-dark-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
45 lines (44 loc) · 1.17 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
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'selector',
content: [
"./src/**/*.{html,js}",
"./*.html"
],
theme: {
extend: {
backgroundImage: {
'moon': "url('../assets/moon.svg')",
"sun": "url('../assets/sun.svg')"
},
keyframes: {
toRight: {
'0%': {
backgroundImage: "url('../assets/sun.svg')",
backgroundColor: 'bg-zinc-100'
},
'100%': {
transform: 'translateX(calc(100% - 12px)) rotate(360deg)',
backgroundImage: "url('../assets/moon.svg')",
backgroundColor: 'bg-zinc-800'
},
},
toLeft: {
'0%': {
transform: 'translateX(calc(100% - 12px)) rotate(360deg)',
backgroundImage: "url('../assets/moon.svg')",
},
'100%': {
transform: 'translateX(calc(0%)) rotate(0deg)',
backgroundImage: "url('../assets/sun.svg')",
},
}
},
animation: {
'toRight': 'toRight .7s ease-in-out forwards',
'toLeft': 'toLeft .7s ease-in-out forwards'
}
},
},
plugins: [],
}