Skip to content

Commit d6cf13a

Browse files
Adam Plesnikadamplesnik
Adam Plesnik
authored andcommitted
Update animations, plugins
1 parent 0ad1933 commit d6cf13a

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"react-router-dom": "^6.22.3"
2929
},
3030
"devDependencies": {
31-
"@adam.plesnik/tailwindcss-scroll-driven-animations": "^0.2.6",
31+
"@adam.plesnik/tailwindcss-scroll-driven-animations": "^0.2.7",
3232
"@types/node": "^20.11.30",
3333
"@types/prismjs": "^1.26.3",
3434
"@types/react": "^18.2.66",

docs/tailwind.config.js

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('tailwindcss').Config} */
22
const defaultTheme = require('tailwindcss/defaultTheme')
3+
import plugin from 'tailwindcss/plugin'
34

45
module.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
}

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)