the-mvm / the-mvm.github.io

The Minimum Viable Model website and Jekyll theme.
https://the-mvm.github.io
GNU General Public License v3.0
86 stars 398 forks source link

Abrupt transitions when changing dark/light themes #15

Closed amaynez closed 3 years ago

amaynez commented 3 years ago

since the dark overlay that covers the main page content when displaying the menu is an ::after element, that only appears when the menu has the .active class. When removing the class through javascript there is no possibility of animation. Therefore I had to create two new classes to animate the object before the .active class is removed, and to do so, I had to set timers both, when showing the menu and when closing the menu, to allow for the transitions before the .active class is removed.