Move accordion keyframes from CSS to Tailwind config and add fallback 'auto' value

This commit is contained in:
yangdx 2025-10-12 01:55:20 +08:00
parent 44f51f883f
commit f2fb1202a3
2 changed files with 4 additions and 21 deletions

View file

@ -116,23 +116,6 @@
--animate-accordion-down: accordion-down 0.2s ease-out;
--animate-accordion-up: accordion-up 0.2s ease-out;
@keyframes accordion-down {
from {
height: 0;
}
to {
height: var(--radix-accordion-content-height, auto);
}
}
@keyframes accordion-up {
from {
height: var(--radix-accordion-content-height, auto);
}
to {
height: 0;
}
}
}
@layer base {

View file

@ -58,12 +58,12 @@ export default {
},
keyframes: {
'accordion-down': {
from: { height: 0 },
to: { height: 'var(--radix-accordion-content-height)' },
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height, auto)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: 0 },
from: { height: 'var(--radix-accordion-content-height, auto)' },
to: { height: '0' },
},
},
animation: {