11/** @type {import('tailwindcss').Config } */
22const defaultTheme = require ( 'tailwindcss/defaultTheme' )
3+ import plugin from 'tailwindcss/plugin'
34
45module . exports = {
56 darkMode : 'selector' ,
@@ -17,14 +18,41 @@ module.exports = {
1718 appear : 'appear auto cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
1819 opacity : 'opacity 2s cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
1920 'scale-to-right' : 'scale-to-right auto linear forwards' ,
21+ 'to-stroke-dashoffset-0' : 'to-stroke-dashoffset-0 5s ease-in-out forwards' ,
2022 'translate-down' : 'translate-down 3s cubic-bezier(0.65, 0.05, 0.17, 0.99) forwards' ,
2123 'translate-up' : 'translate-up auto ease-in-out forwards' ,
2224 } ,
2325 transitionTimingFunction : {
2426 bounce : 'cubic-bezier(0.26, 0.53, 1, 0.63)' ,
2527 line : 'cubic-bezier(0.65, 0.05, 0.17, 0.99)' ,
2628 } ,
29+ keyframes : {
30+ 'to-stroke-dashoffset-0' : {
31+ to : { strokeDashoffset : 0 } ,
32+ } ,
33+ } ,
2734 } ,
2835 } ,
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+ ] ,
3058}
0 commit comments