Skip to content

Commit

Permalink
Merge pull request #10229 from CaptainYouz/issue-9909_mobile-menu
Browse files Browse the repository at this point in the history
Mobile Menu: improve UX/UI of the mobile menu
  • Loading branch information
mickaelandrieu committed Sep 20, 2018
2 parents 7d3d33b + b8d44ca commit 7b212ca
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
5 changes: 2 additions & 3 deletions themes/classic/_dev/css/components/mainmenu.scss
Expand Up @@ -73,8 +73,7 @@
}

#mobile_top_menu_wrapper {
margin: .625rem 0 0;
padding-bottom: 0.625rem;
padding: 15px;
background: white;
#top-menu {
margin-bottom: 0.625rem;
Expand Down Expand Up @@ -121,7 +120,7 @@
margin-left: 0;
width: 100%;
min-width: 100%;
background: $gray-lighter;
background: white;
ul[data-depth="0"] > li {
border-bottom: 1px solid $gray;
}
Expand Down
17 changes: 11 additions & 6 deletions themes/classic/_dev/css/theme.scss
Expand Up @@ -56,7 +56,7 @@
#menu-icon {
vertical-align: middle;
cursor: pointer;
margin-left: 1rem;
margin: 0 1rem;
.material-icons {
line-height: 50px;
}
Expand Down Expand Up @@ -295,7 +295,6 @@
padding-bottom: 0;
}
}

@include media-breakpoint-down(sm) {
#wrapper {
box-shadow: none;
Expand All @@ -312,10 +311,7 @@
margin-bottom: 0.625rem;
color: $gray-darker;
.top-logo {
line-height: 50px;
vertical-align: middle;
width: 200px;
margin: 0 auto;
padding-top: 11px;
a {
img {
max-height: 50px;
Expand Down Expand Up @@ -352,6 +348,15 @@
a[data-depth="0"] {
color: $gray-darker;
}
.search-widget {
width: 100%;
}
}
&.is-open {
background-color: white;
.header-top {
background-color: white;
}
}
}
section.checkout-step {
Expand Down
15 changes: 6 additions & 9 deletions themes/classic/_dev/js/components/top-menu.js
Expand Up @@ -68,14 +68,11 @@ export default class TopMenu extends DropDown {
}

toggleMobileMenu() {
if ($('#mobile_top_menu_wrapper').is(":visible")) {
$('#notifications').hide();
$('#wrapper').hide();
$('#footer').hide();
} else {
$('#notifications').show();
$('#wrapper').show();
$('#footer').show();
}
$('#header').toggleClass('is-open');
if ($('#mobile_top_menu_wrapper').is(":visible")) {
$('#notifications, #wrapper, #footer').hide();
} else {
$('#notifications, #wrapper, #footer').show();
}
}
}
2 changes: 1 addition & 1 deletion themes/classic/assets/css/theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/classic/assets/js/theme.js

Large diffs are not rendered by default.

0 comments on commit 7b212ca

Please sign in to comment.