Enhance CSS animations and performance across seasonal styles; add will-change property for smoother transitions and optimize keyframes. [skip ci]

This commit is contained in:
CodeDevMLH
2026-02-27 03:42:23 +01:00
parent 296873f89e
commit f14785c54a
14 changed files with 303 additions and 402 deletions

View File

@@ -228,7 +228,19 @@ function createBirthday() {
// Ensure the burst container is appended to the main document body or the birthday container
createBalloonPopConfetti(document.body, cx, cy, balloonColors[randomItem]);
}
}, { once: true });
});
// Reset the balloon when it reappears at the bottom of the screen
symbol.addEventListener('animationiteration', function(e) {
// Ignore bubbling events from the inner sway animation
if (e.animationName === 'birthday-rise' || e.target === symbol) {
if (innerDiv.classList.contains('popped')) {
innerDiv.classList.remove('popped');
innerDiv.style.animation = '';
innerDiv.style.pointerEvents = 'auto';
}
}
});
}
const startRot = (Math.random() * 20) - 10; // -10 to +10 spread