Restored animations
Restore previously removed animations when changing months
Things to consider:
- Should animations be toggle-able?
- What about users that prefer reduced motion
I actually commented here under the commit, which removed animations: https://github.com/MathiasWP/CalendarPickerJS/commit/5d078439583f9e1a579661cb463dbdeeed731332#comments
Did you get some user feedback and that's why you removed these in the first place?
I'd say that animations make things look better and a lot is animated in websphere. Just by adding configurability to this library doesn't change anything in global space.
However, when animations need to be disabled then it is easy to do it via the following CSS:
#calendar-grid.swoosh-up,
#calendar-grid.swoosh-up-reverse,
#calendar-grid.swoosh-down,
#calendar-grid.swoosh-down-reverse {
animation: none !important;
}
No need to add any extra complexity to this library's codebase to turn animations off.
@MathiasWP Just found out about this CSS feature called prefers-reduced-motion: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
Implemented your requested change - user can now toggle animation via global system setting. I also tested it in Firefox as is mentioned in the documentation above.