Releases: alexmacarthur/slide-element
Dependency Updates
All sorts of dependencies have been updated, including JS + GitHub Actions. Also, I've migrated from Jest to Vitest.
Make `overflow` Value Configurable
Introduces an overflow option that can be used to customize the value applied to an element during an animation. Ex:
down(document.getElementById("element"), {
overflow: "auto"
});Set Default Overflow to "hidden"
Sets the default overflow value to hidden, to prevent scrollbars from temporarily appearing during an animation.
Simplify Open/Closed State Management
Simplifies a couple of things that had to do with holding the state (open or closed) of an element.
Fix Overflow Issue in Safari
When particular contents (like pre tags) were contained within a sliding element, Safari saw an issue where the contents would bleed outside of the element during animation.
This was fixed by explicitly setting the overflow value to auto during an animation.
Allow Dynamic Heights + Padding
- allows for dynamic height values (useful in cases where items within the element are inserted, removed, or resized between animations).
- allows for elements to have their padding values animated
WeakMap Over Map
Changes the library from using a Map() to store expanded height values, in favor of a WeakMap, for an ultra-small performance optimization.
Improved Accessibility
Automatically sets correct aria-expanded attribute values after each sliding animation.
Rapid Triggering & Accessibility Support
- Addresses a bug that would occur when a user would rapidly trigger an animation without letting an in-progress one finish.
- Respects
prefers-reduced-motionsetting on a user's machine.
Disable Overflow
For some contents, if the overflow wasn't set to hidden while animating, the contents were bleeding outside of the box. This change explicitly sets the correct overflow value to prevent this from happening.