.main-navigation-sidebar { width: $sidebar-width; min-height: 100vh; background-color: $sidebar-bg; @include clearfix(); z-index: z(menu); } .sidebar-logo { display: block; width: 100%; padding: 24px 0; text-align: center; color: white; background-color: darken($sidebar-bg, 10%); text-decoration: none; padding: 20px; svg { max-width: 60%; margin: auto; } &.lato-logo { svg { position: relative; top: 2px; @include size(70px, 26px); path { fill: white; } } } } .sidebar-nav { width: 100%; } .sidebar-list { list-style: none; margin: 0; padding: 0; .sidebar-list-item { position: relative; .sidebar-main-link { font-size: 14px; color: $sidebar-inactive-color; display: block; padding: 10px 0 14px 25px; text-decoration: none; transition: background-color 0.25s ease-in-out, color 0.25s ease; .sidebar-item-icon { display: inline-block; padding-right: 15px; svg { @include size(18px); display: inline-block; position: relative; top: 3px; path { fill: $sidebar-inactive-color; transition: all 0.25s ease; } } } &:hover { background-color: darken($sidebar-bg, 10%); .sidebar-item-icon { svg path { fill: $sidebar-icon-active-color; } } } } &:before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; opacity: 0; background-color: transparent; transition: opacity 0.3s ease, background-color 0.25s ease-in-out; } &.has-child { > ul { width: 100%; position: absolute; top: 0; left: 100%; width: 160px; display: none; list-style: none; padding: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); z-index: 1; a { font-size: 14px; padding: 14px 10px 14px 20px; text-decoration: none; position: relative; background-color: $sidebar-bg; color: $sidebar-color; display: block; transition: background-color 0.25s ease-in-out; &:hover { background-color: darken($sidebar-bg, 10%); } } } @include mq-min(1024px) { &:hover { > ul { display: block; opacity: 1; visibility: visible; } } } } &.active, &:hover { &:before { opacity: 1; background-color: $sidebar-icon-active-color; } a { color: $sidebar-color; } .sidebar-main-link { color: white; svg path { fill: $sidebar-icon-active-color; } } } } } @include mq-max(1023px) { .main-navigation-sidebar { width: 160px; } .sidebar-list { .sidebar-list-item { border-bottom: 1px solid lighten($sidebar-bg, 7%); .sidebar-main-link { padding: 14px 0; text-align: center; .sidebar-item-icon { display: block; padding-right: 0; } } &.has-child { > ul.is-drop-open { display: block; opacity: 1; visibility: visible; } } } } } @include mq-max(766px) { .main-navigation-sidebar { width: 100%; min-height: auto; position: absolute; top: 54px; left: 0; opacity: 0; visibility: hidden; z-index: -1; &.is-mobile-menu-open { opacity: 1; visibility: visible; z-index: 90; } } .sidebar-logo { display: none; } .sidebar-list { border-top: 1px solid lighten($sidebar-bg, 7%); } .sidebar-list .sidebar-list-item .sidebar-main-link { text-align: left; padding-left: 25px; padding-top: 20px; padding-bottom: 20px; .sidebar-item-icon { display: inline-block; padding-right: 20px; } } .sidebar-list .sidebar-list-item.has-child > ul { width: 100%; position: relative; top: auto; left: auto; box-shadow: none; li { border-top: 1px solid lighten($sidebar-bg, 7%); } a { background-color: darken($sidebar-bg, 10%); } } }