diff --git a/assets/css/style.css b/assets/css/style.css index 926192b..5db5513 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -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; } @@ -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 { diff --git a/assets/css/style.scss b/assets/css/style.scss index 23f5441..2e81faf 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -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 { @@ -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 { @@ -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 { @@ -112,4 +126,4 @@ } } } -} \ No newline at end of file +} diff --git a/storefront-hamburger-menu.php b/storefront-hamburger-menu.php index fc21511..2bd0575 100644 --- a/storefront-hamburger-menu.php +++ b/storefront-hamburger-menu.php @@ -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