1
1
/** @type {import('tailwindcss').Config } */
2
2
const defaultTheme = require ( 'tailwindcss/defaultTheme' )
3
+ import plugin from 'tailwindcss/plugin'
3
4
4
5
module . exports = {
5
6
darkMode : 'selector' ,
@@ -17,14 +18,41 @@ module.exports = {
17
18
appear : 'appear auto cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
18
19
opacity : 'opacity 2s cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
19
20
'scale-to-right' : 'scale-to-right auto linear forwards' ,
21
+ 'to-stroke-dashoffset-0' : 'to-stroke-dashoffset-0 5s ease-in-out forwards' ,
20
22
'translate-down' : 'translate-down 3s cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
21
23
'translate-up' : 'translate-up auto ease-in-out forwards' ,
22
24
} ,
23
25
transitionTimingFunction : {
24
26
bounce : 'cubic-bezier(0.26, 0.53, 1, 0.63)' ,
25
27
line : 'cubic-bezier(0.65, 0.05, 0.17, 0.99)' ,
26
28
} ,
29
+ keyframes : {
30
+ 'to-stroke-dashoffset-0' : {
31
+ to : { strokeDashoffset : 0 } ,
32
+ } ,
33
+ } ,
27
34
} ,
28
35
} ,
29
- plugins : [ require ( '@adam.plesnik/tailwindcss-scroll-driven-animations' ) ] ,
36
+ plugins : [
37
+ require ( '@adam.plesnik/tailwindcss-scroll-driven-animations' ) ,
38
+ plugin ( function ( { matchUtilities, addVariant } ) {
39
+ matchUtilities (
40
+ {
41
+ 'dash-offset' : ( value , { modifier } ) => ( {
42
+ strokeDashoffset : modifier ,
43
+ } ) ,
44
+ } ,
45
+ { values : { DEFAULT : '' } , modifiers : 'any' }
46
+ )
47
+ matchUtilities (
48
+ {
49
+ 'dash-array' : ( value , { modifier } ) => ( {
50
+ strokeDasharray : modifier ,
51
+ } ) ,
52
+ } ,
53
+ { values : { DEFAULT : '' } , modifiers : 'any' }
54
+ )
55
+ addVariant ( 'path' , '& > path' )
56
+ } ) ,
57
+ ] ,
30
58
}
0 commit comments