_sass/core/includes/header-navigation.scss (177 lines of code) (raw):

// This is a partial. // It lies in <source>/_sass, just waiting to be imported. // It does not contain the YAML front matter and has no corresponding output file in the built site. // Navigation Variables $content-width: 1000px; $nav-breakpoint: 1024px; $nav-height: 70px; section.nav-content { padding: 0 13rem; @media screen and (max-width: 1400px) { padding: 0 4rem; } @media screen and (max-width: 1150px) { padding: 0 2rem; } @media screen and (max-width: 1024px) { padding: 0 6rem; } @media screen and (max-width: 480px) { padding: 0 2rem; } } // Outer navigation wrapper .navigation { height: $nav-height; } // Container with no padding for navbar .nav-container { max-width: $content-width; margin: 0 auto; display: inline; } // Navigation nav { float: right; ul { list-style: none; margin: 0; padding: 0; li { float: left; position: relative; a, a:visited, a:hover { display: block; padding: 0 20px; line-height: $nav-height; font-size: 1.5rem; text-decoration: none; color: $black; &.active { font-weight: 700; } } } } } nav ul.nav-list { .button-cta.secondary { line-height: 1.3; padding: .4rem 1rem; margin-top: 1rem; text-transform: none; } li:hover .nav-submenu{ display: block; } li a { font-size: 1.1rem; padding: 0 10px; } } .nav-submenu{ background: $gray-0; display: none; position: absolute; top: 100%; left: 50%; padding: 0.5em 0; transform: translateX(-50%); &:before{ content: ''; position: absolute; border-bottom: 6px solid $light-gray; border-left: 6px solid transparent; border-right: 6px solid transparent; bottom: 100%; left: 50%; transform: translateX(-50%); } } .nav-submenu-item{ min-width: 12rem; text-align: left; a{ line-height: 2rem; } a:hover{ background: $blue; color: $white; } } /* Mobile navigation */ // Binds to JS Toggle .nav-mobile { display: none; position: absolute; top: 3rem; right: 0; height: $nav-height; width: $nav-height; } @media only screen and (max-width: $nav-breakpoint) { .navigation { padding-top: 2rem; } .nav-mobile { display: block; z-index: 1; } .logo-wrapper { display: block; margin: 0 auto; padding-top: 0; } nav { width: 16rem; padding-top: 0; .nav-list { background-color: $gray-0; position: relative; left: 100px; top: -80px; padding: 1.5rem; @media screen and (max-width: 468px) { left: 50px; } .button-cta.secondary { display: none; } } ul { display: none; li { float: none; margin: .5rem 0; a, a:visited, a:hover { line-height: 1.5; color: $dark-blue; &.active { color: $dark-blue; font-weight: 700; } } ul li a { padding-left: 30px; } } } } } @media screen and (min-width: $nav-breakpoint) { .nav-list { display: block !important; } } #nav-toggle { position: absolute; cursor: pointer; span, span:before, span:after { cursor: pointer; border-radius: 1px; height: 5px; width: 35px; background: $black; position: absolute; display: block; content: ''; transition: all 300ms ease-in-out; } span:before { top: -10px; } span:after { bottom: -10px; } &.active span { background-color: transparent; &:before, &:after { top: 0; } &:before { transform: rotate(45deg); } &:after { transform: rotate(-45deg); } } } @media only screen and (max-width: 480px) { nav { width: 18rem; } }