Skip to content

Commit

Permalink
Merge branch 'jobthomas-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagonoronha committed May 21, 2018
2 parents 656af3c + c4ed4b6 commit c628ea7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
14 changes: 6 additions & 8 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,8 @@
.storefront-hamburger-menu-active .main-navigation div.menu > ul {
margin-top: .53em; }
.storefront-hamburger-menu-active .main-navigation.toggled button.menu-toggle:before {
-webkit-transform: translateY(-4px);
-moz-transform: translateY(-4px);
-ms-transform: translateY(-4px);
-o-transform: translateY(-4px);
transform: translateY(-4px); }
.storefront-hamburger-menu-active .main-navigation.toggled button.menu-toggle:after {
-webkit-transform: translateY(4px);
-moz-transform: translateY(4px);
-ms-transform: translateY(4px);
-o-transform: translateY(4px);
transform: translateY(4px); }
.storefront-hamburger-menu-active .main-navigation.toggled button.menu-toggle span:before {
opacity: 1; }
Expand All @@ -62,6 +54,12 @@
.storefront-hamburger-menu-active.admin-bar .main-navigation .handheld-navigation,
.storefront-hamburger-menu-active.admin-bar .main-navigation div.menu {
padding-top: 32px; } }

.storefront-2-3.storefront-hamburger-menu-active .main-navigation .shm-close:before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f00d"; }

@media screen and (max-width: 782px) {
.storefront-hamburger-menu-active.admin-bar .main-navigation .handheld-navigation,
.storefront-hamburger-menu-active.admin-bar .main-navigation div.menu {
Expand Down
26 changes: 20 additions & 6 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import 'susy';
@import 'bourbon';
@import '../../../../themes/storefront/assets/sass/utils/variables';

@import '../../../../themes/storefront/assets/css/sass/utils/variables';
@import '../../../../themes/storefront/assets/css/sass/vendors/font-awesome/variables';

.storefront-hamburger-menu-active {
.shm-close {
Expand Down Expand Up @@ -46,11 +46,11 @@
&.toggled {
button.menu-toggle {
&:before {
@include transform(translateY(-4px));
transform: translateY(-4px);
}

&:after {
@include transform(translateY(4px));
transform: translateY(4px);
}

span:before {
Expand Down Expand Up @@ -101,6 +101,20 @@
}
}

.storefront-2-3 {
&.storefront-hamburger-menu-active {
.main-navigation {
.shm-close {
&:before {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: fa-content( $fa-var-times );
}
}
}
}
}

@media screen and (max-width: 782px) {
.storefront-hamburger-menu-active {
&.admin-bar {
Expand All @@ -112,4 +126,4 @@
}
}
}
}
}
7 changes: 7 additions & 0 deletions storefront-hamburger-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,14 @@ public function shm_customize_preview_js() {
* Adds a class based on the extension name and any relevant settings.
*/
public function shm_body_class( $classes ) {
global $storefront_version;

if ( version_compare( $storefront_version, '2.3.0', '>=' ) ) {
$classes[] = 'storefront-2-3';
}

$classes[] = 'storefront-hamburger-menu-active';

return $classes;
}
} // End Class

0 comments on commit c628ea7

Please sign in to comment.