/* * 3.2 Top Nav * ------------- */ .main_menu { position: fixed; left: 0; top: 0; width: 100%; background: $tm_bg_color; transition: .3s all ease; color: $tm_color; z-index: 105; a{ color: $tm_color; &:hover{ color: $tm_hover_color; } } @media screen and (min-width: $nav_collapse + 1) { .content{ @include flexbox(row, wrap, space-between, center); } } @media screen and (max-width: $nav_collapse){ .search{ display: none; } } ul{ list-style: none; @include flexbox(row, wrap, flex-start, center); li{ list-style: none; display: inline-block; vertical-align: middle; position: relative; padding: 7px; } } .menu-item-has-children{ line-height: 1; } .parent { position: relative; a, .submenu-opener{ display: inline-block; vertical-align: middle; line-height: 1; } // @include flexbox(row, wrap, flex-start, center); .submenu-opener { font-size: 0; position: relative; width: 20px; height: 20px; transition: .6s all ease; // background: red; @media screen and (max-width: $nav_collapse) { margin-left: 20px; } @media screen and (min-width: $nav_collapse + 1) { margin-left: 5px; } &.sub-menu-is-open { transform: rotate(-180deg); } &:after { content: ''; @include triangle_eqla(10px, down, $tm_color); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -20%); transition: .3s all ease; } &:hover { cursor: pointer; &:after { border-color: $tm_hover_color transparent transparent transparent; } } } } .sub-menu{ display: none; position: absolute; top: 100%; background: lighten($tm_bg_color, 5%); li a{ padding: 5px; } } @media screen and (max-width: $nav_collapse){ max-width: 300px; height: 100%; left: -300px; transform: translateX(0); &.open{ transform: translateX(300px); } ul{ display: block; width: 100%; padding: 0; margin: 0; li{ display: block; width: 100%; line-height: 1.4; margin: 0; padding: 0; a{ display: block; padding: 10px; } } } .sub-menu{ position: relative; } } } .toggle{ @extend a; &:hover{ cursor: pointer; } @media screen and (min-width: $nav_collapse + 1){ display: none; } .main_menu &{ display: block; width: 100%; text-align: right; padding: 5px 10px; box-sizing: border-box; @media screen and (min-width: $nav_collapse + 1){ display: none; } } } // Search #search { position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); transition: all 0.5s ease-in-out; transform: translate(0px, -100%) scale(0, 0); opacity: 0; display: none; &.open { transform: translate(0px, 0px) scale(1, 1); opacity: 1; z-index: 106; display: block; } input[type="search"] { position: absolute; top: 50%; width: 100%; color: rgb(255, 255, 255); background: rgba(0, 0, 0, 0); font-size: 60px; font-weight: 300; text-align: center; border: 0px; margin: 0px auto; margin-top: -51px; padding-left: 30px; padding-right: 30px; outline: none; } }