@media (min-width: 768px) { body:not(.global-nav-is-open) .global-navigation { display: none; // Hide the global navigation when the .global-nav-is-open class is not present on the body } body:not(.global-nav-is-open) #itrp-backdrop { display: none; // Hide the backdrop } body.global-nav-is-open .global-navigation { background: white; // white background color display: block; // Show the menu position: fixed; // Fix its position... top: 40px; // ...to about 40px from the top of the screen (just underneath the hamburger menu) z-index: 1000; // Put the menu on top of everything. min-height: 0; // no minimal height, just long enough to contain all menu items } body.global-nav-is-open #itrp-backdrop { display: block; // Show the backdrop position: fixed; // Fix its position... top: 0; bottom: 0; left: 0; right: 0; // ... to the entire browser window z-index: 999; // Put the backdrop on top of everything, except the navigation menu } } @media (max-width: 767px) { // Only on small screens body .global-navigation { position: fixed; // Fix the navigation menu... top: 0; // ... to the top of the screen width: 14em; // Make it 14em wide left: -14em; // And put it just outside the visible window (so that it is initially hidden) transition: transform 300ms;// When the menu is 'transformed', animate the transition for a duration of 300 millisecs } body.global-nav-is-open .global-navigation { // When the menu is open... background: white; // White background color color: #40474d; // And grey text color transform: translate3d(14em, 0, 0); // ...move the menu 14em to the right, so that it becomes visible. min-height: 0; // no minimal height, just long enough to contain all menu items } }