Disables fill: forwards for spacer height animation

Removes the `fill: 'forwards'` property to ensure CSS `calc()` takes over the header spacer's height after the animation concludes.
This commit is contained in:
Janus C. H. Knudsen 2025-09-23 16:30:30 +02:00
parent eb7d257b52
commit c08fa02c29

View file

@ -231,7 +231,7 @@ export class AllDayManager {
}) })
]; ];
// Add spacer animation if spacer exists // Add spacer animation if spacer exists, but don't use fill: 'forwards'
if (headerSpacer) { if (headerSpacer) {
const root = document.documentElement; const root = document.documentElement;
const currentSpacerHeight = parseInt(getComputedStyle(root).getPropertyValue('--header-height')) + currentHeight; const currentSpacerHeight = parseInt(getComputedStyle(root).getPropertyValue('--header-height')) + currentHeight;
@ -243,8 +243,8 @@ export class AllDayManager {
{ height: `${targetSpacerHeight}px` } { height: `${targetSpacerHeight}px` }
], { ], {
duration: 150, duration: 150,
easing: 'ease-out', easing: 'ease-out'
fill: 'forwards' // No fill: 'forwards' - let CSS calc() take over after animation
}) })
); );
} }