fix: make hamburger menu animation smooth
The menu was appearing instantly without animation because the overflow property was changing from 'hidden' to 'auto' on hover, which disrupted the max-height transition. Fix: Keep overflow-y: auto consistent at all times. This allows the max-height animation to work smoothly from 0 to calc(100vh - 50px), creating a smooth top-to-bottom expansion effect.
This commit is contained in:
+1
-3
@@ -2033,7 +2033,7 @@ a:focus {
|
||||
background: #ffffff;
|
||||
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
|
||||
transition: max-height 0.4s ease-in-out;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
z-index: 99;
|
||||
pointer-events: none; /* Disable pointer events when hidden */
|
||||
}
|
||||
@@ -2042,14 +2042,12 @@ a:focus {
|
||||
.navigation-menu:hover,
|
||||
.navigation-menu.menu-hover {
|
||||
max-height: calc(100vh - 50px);
|
||||
overflow-y: auto;
|
||||
pointer-events: auto; /* Enable pointer events when visible */
|
||||
}
|
||||
|
||||
/* Legacy class for JS compatibility - keep for backward compatibility */
|
||||
.navigation-menu.menu-open {
|
||||
max-height: calc(100vh - 50px);
|
||||
overflow-y: auto;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user