Add animations to open / close menus

Created on 13 July 2023, over 1 year ago
Updated 7 May 2024, 7 months ago

Problem/Motivation

Add open close animations to both icons and the submenus.

Doing the submenus is tricky, because you can't animate the max-height between 0 and auto. There's ways around this, such as

  • Instead of display: none the submenu, use visibility: hidden and position: absolute.
  • Doing so, will enable you to use JS to calculate the height of each submenu using something like offsetHeight.
  • Use JS to add that height as the value of an inline custom property.
  • Animate max-height to the value of that custom property
📌 Task
Status

Needs work

Version

11.0 🔥

Component
Navigation 

Last updated about 18 hours ago

No maintainer
Created by

🇺🇸United States baluv3

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024