// @file // The mobile navigation stylesheet for this theme. @import 'init'; .main-menu, .header__region { // stylelint-disable selector-class-pattern display: none; @include respond-to(s) { display: block; } } .mobile-nav { @include typeface(headings); position: absolute; right: 0; top: 0; width: 100vw; height: 100vh; overflow: hidden; z-index: 20; pointer-events: none; @include respond-to(s) { display: none; } .js-nav-open & { position: fixed; } &__cover { position: absolute; width: 100vw; height: 100vh; background-color: var(--color-mobile-menu-cover); opacity: 0; .js-nav-open & { opacity: 1; pointer-events: auto; } } &__toggle { display: block; position: absolute; top: $zen-gutters; right: $zen-gutters; padding: 6px 30px 6px 6px; z-index: 22; text-decoration: none; font-weight: bold; line-height: 1; border: 1px solid var(--color-border); border-radius: $s-radius; color: var(--color-text); pointer-events: auto; @include respond-to(s) { display: none; } .js-nav-open & { color: var(--color-text-bg); } &::after { position: absolute; content: ''; margin-left: 4px; width: 20px; height: 20px; border-top: 12px double var(--color-text); border-bottom: 4px solid var(--color-text); } .js-nav-open &::after { border-color: var(--color-text-bg); } } &__sheet { background-color: var(--color-mobile-menu); width: 90vw; height: 100vh; padding: 2rem; transform: translateX(100vw); z-index: 21; a { color: var(--color-text-bg); text-decoration: none; &:hover, &:focus { color: var(--color-text-bg); } } .js-nav-open & { pointer-events: auto; box-shadow: -10px 0 10px -10px var(--color-nearblack); transform: translateX(10vw); } } &__navbar { display: flex; flex-direction: column; padding: 0; margin: 0; li { list-style-type: none; margin: .4rem 0; } } &__cover, &__toggle, &__toggle::after, &__sheet { transition: all 130ms ease-in; .js-nav-open & { transition: all 330ms ease-out; } } }