Created by: goulvench
The proposed change replaces the current static SVG background in navbar toggler buttons with pseudo-elements, which animate to an x-shape when the menu is expanded. This change adds visual feedback when opening menus, like the accordion component, and like most menu icons.
I know that animating the menu icon has been discussed and rejected in #25788 (closed) but since I add this to every website I build, I thought the discussion could be reopened as others might find it useful too.
Code linted and tested, works with light, dark and colored backgrounds thanks to currentColor
, and is easy to override by using a different class on the <span>
.