123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- // /**
- // * Copyright © Magento, Inc. All rights reserved.
- // * See COPYING.txt for license details.
- // */
- //
- // Variables
- // _____________________________________________
- @active-nav-indent: 54px;
- //
- // Common
- // _____________________________________________
- & when (@media-common = true) {
- .panel.header {
- .links,
- .switcher {
- display: none;
- }
- }
- .nav-sections {
- .lib-css(background, @navigation__background);
- }
- .nav-toggle {
- .lib-icon-font(
- @icon-menu,
- @_icon-font-size: 28px,
- @_icon-font-color: @header-icons-color,
- @_icon-font-color-hover: @header-icons-color-hover
- );
- .lib-icon-text-hide();
- cursor: pointer;
- display: block;
- font-size: 0;
- left: 15px;
- position: absolute;
- top: 15px;
- z-index: 14;
- }
- }
- //
- // Mobile
- // _____________________________________________
- .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
- .navigation {
- padding: 0;
- .parent {
- .level-top {
- position: relative;
- .lib-icon-font(
- @_icon-font-content: @icon-down,
- @_icon-font-size: 42px,
- @_icon-font-position: after,
- @_icon-font-display: block
- );
- &:after {
- position: absolute;
- right: 7px;
- top: -8px;
- }
- &.ui-state-active {
- .lib-icon-font-symbol(
- @_icon-font-content: @icon-up,
- @_icon-font-position: after
- );
- }
- }
- }
- }
- .nav-sections {
- -webkit-overflow-scrolling: touch;
- .lib-css(transition, left .3s, 1);
- height: 100%;
- left: -80%;
- left: calc(~'-1 * (100% - @{active-nav-indent})');
- overflow: auto;
- position: fixed;
- top: 0;
- width: 80%;
- width: calc(~'100% - @{active-nav-indent}');
- .switcher {
- border-top: 1px solid @color-gray82;
- font-size: 1.6rem;
- font-weight: @font-weight__bold;
- margin: 0;
- padding: .8rem 3.5rem .8rem 2rem;
- .label {
- display: block;
- margin-bottom: @indent__xs;
- }
- &:last-child {
- border-bottom: 1px solid @color-gray82;
- }
- }
- .switcher-trigger {
- strong {
- position: relative;
- .lib-icon-font(
- @_icon-font-content: @icon-down,
- @_icon-font-size: 42px,
- @_icon-font-position: after,
- @_icon-font-display: block
- );
- &:after {
- position: absolute;
- right: -40px;
- top: -16px;
- }
- }
- &.active strong {
- .lib-icon-font-symbol(
- @_icon-font-content: @icon-up,
- @_icon-font-position: after
- );
- }
- }
- .switcher-dropdown {
- .lib-list-reset-styles();
- display: none;
- padding: @indent__s 0;
- }
- .switcher-options {
- &.active {
- .switcher-dropdown {
- display: block;
- }
- }
- }
- .header.links {
- .lib-list-reset-styles();
- border-bottom: 1px solid @color-gray82;
- li {
- font-size: 1.6rem;
- margin: 0;
- &.greet.welcome {
- border-top: 1px solid @color-gray82;
- font-weight: @font-weight__bold;
- padding: .8rem @indent__base;
- }
- > a {
- border-top: 1px solid @color-gray82;
- }
- }
- a,
- a:hover {
- .lib-css(color, @navigation-level0-item__color);
- .lib-css(text-decoration, @navigation-level0-item__text-decoration);
- display: block;
- font-weight: @font-weight__bold;
- padding: .8rem @indent__base;
- }
- .header.links {
- border: 0;
- }
- }
- }
- .nav-before-open {
- height: 100%;
- overflow-x: hidden;
- width: 100%;
- .page-wrapper {
- .lib-css(transition, left .3s, 1);
- height: 100%;
- left: 0;
- overflow: hidden;
- position: relative;
- }
- body {
- height: 100%;
- overflow: hidden;
- position: relative;
- width: 100%;
- }
- }
- .nav-open {
- .page-wrapper {
- left: 80%;
- left: calc(~'100% - @{active-nav-indent}');
- }
- .nav-sections {
- @_shadow: 0 0 5px 0 rgba(50, 50, 50, .75);
- .lib-css(box-shadow, @_shadow, 1);
- left: 0;
- z-index: 99;
- }
- .nav-toggle {
- &:after {
- background: rgba(0, 0, 0, @overlay__opacity);
- content: '';
- display: block;
- height: 100%;
- position: fixed;
- right: 0;
- top: 0;
- width: 100%;
- z-index: 1;
- }
- }
- }
- .nav-sections-items {
- .lib-clearfix();
- position: relative;
- z-index: 1;
- }
- .nav-sections-item-title {
- background: darken(@navigation__background, 5%);
- border: solid darken(@navigation__background, 10%);
- border-width: 0 0 1px 1px;
- box-sizing: border-box;
- float: left;
- height: 71px;
- padding-top: 24px;
- text-align: center;
- width: 33.33%;
- &.active {
- background: transparent;
- border-bottom: 0;
- }
- .nav-sections-item-switch {
- &:hover {
- text-decoration: none;
- }
- }
- }
- .nav-sections-item-content {
- .lib-clearfix();
- box-sizing: border-box;
- float: right;
- margin-left: -100%;
- margin-top: 71px;
- width: 100%;
- &.active {
- display: block;
- }
- padding: @indent__m 0;
- }
- .lib-main-navigation();
- }
- //
- // Desktop
- // _____________________________________________
- .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
- .nav-toggle {
- display: none;
- }
- .nav-sections {
- .lib-vendor-prefix-flex-shrink(0);
- .lib-vendor-prefix-flex-basis(auto);
- margin-bottom: @indent__m;
- }
- .nav-sections-item-title {
- display: none;
- }
- .nav-sections-item-content {
- display: block !important;
- }
- .nav-sections-item-content > * {
- display: none;
- }
- .nav-sections-item-content {
- > .navigation {
- display: block;
- }
- }
- .lib-main-navigation-desktop();
- .panel.header {
- .links,
- .switcher {
- display: inline-block;
- }
- }
- }
|