File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { createNav } from "@canonical/global-nav";
1212const DROPDOWN_ANIMATION_DURATION = 333 ;
1313const toggles = [
1414 ...document . querySelectorAll (
15- ".p-navigation__nav .p-navigation__link[aria-controls]:not(.js-back-button)"
15+ ".p-navigation__nav .p-navigation__link[aria-controls]:not(.js-back-button)" ,
1616 ) ,
1717] . filter ( ( element ) => element . id !== "all-canonical-link" ) ;
1818
@@ -28,8 +28,10 @@ const toggleAnimationPlaying = (element: Element) => {
2828const setAnimationPlaying = ( ) => {
2929 // get all open toggles to add the animation playing to them
3030 toggles
31- . filter ( ( toggle : Element ) : toggle is Element =>
32- toggle . parentElement != null && toggle . parentElement . classList . contains ( "is-active" )
31+ . filter (
32+ ( toggle : Element ) : toggle is Element =>
33+ toggle . parentElement != null &&
34+ toggle . parentElement . classList . contains ( "is-active" )
3335 )
3436 . forEach ( ( toggle : Element ) => {
3537 toggleAnimationPlaying ( toggle . parentElement ! ) ;
Original file line number Diff line number Diff line change 6666 position : relative ;
6767 }
6868
69- .js-animation-playing .p-navigation__dropdown--container ,
70- .is-active .p-navigation__dropdown--container {
71- display : block ;
72- }
73-
7469 .p-navigation__dropdown--container {
7570 // a bit extra % to be able to show the shadow of the box if present
7671 clip-path : rect (0 105% 105% 0 );
9691 }
9792 }
9893 }
94+
95+ .js-animation-playing .p-navigation__dropdown--container ,
96+ .is-active .p-navigation__dropdown--container {
97+ display : block ;
98+ }
9999 }
100100 }
101101}
You can’t perform that action at this time.
0 commit comments