From 4b52ec9120d2326ec0ca3e5076cdcdc80607bd7f Mon Sep 17 00:00:00 2001 From: derweili Date: Fri, 1 Mar 2019 18:40:49 +0100 Subject: [PATCH 1/2] css cleanup Styling removed to stay closer to the default foundation-sites styling --- src/assets/scss/_settings.scss | 10 ++-- src/assets/scss/modules/_navigation.scss | 71 ------------------------ 2 files changed, 5 insertions(+), 76 deletions(-) diff --git a/src/assets/scss/_settings.scss b/src/assets/scss/_settings.scss index 3820158ec..54314759e 100644 --- a/src/assets/scss/_settings.scss +++ b/src/assets/scss/_settings.scss @@ -392,13 +392,13 @@ $dropdownmenu-arrow-color: $anchor-color; $dropdownmenu-arrow-size: 6px; $dropdownmenu-arrow-padding: 1.5rem; $dropdownmenu-min-width: 200px; -$dropdownmenu-background: $dark-nav-color; -$dropdownmenu-submenu-background: $dropdownmenu-background; +$dropdownmenu-background: null; +$dropdownmenu-submenu-background: $white; $dropdownmenu-padding: $global-menu-padding; $dropdownmenu-nested-margin: 0; $dropdownmenu-submenu-padding: $dropdownmenu-padding; $dropdownmenu-border: 1px solid $medium-gray; -$dropdown-menu-item-color-active: $light-gray; +$dropdown-menu-item-color-active: get-color(primary); $dropdown-menu-item-background-active: transparent; // 19. Flexbox Utilities @@ -847,8 +847,8 @@ $tooltip-radius: $global-radius; // 55. Top Bar // ----------- -$topbar-padding: 0; -$topbar-background: $dark-nav-color; +$topbar-padding: 0.5rem; +$topbar-background: $light-gray; $topbar-submenu-background: $topbar-background; $topbar-title-spacing: 0.5rem 1rem 0.5rem 0; $topbar-input-width: 200px; diff --git a/src/assets/scss/modules/_navigation.scss b/src/assets/scss/modules/_navigation.scss index 96651f704..f50e521cd 100644 --- a/src/assets/scss/modules/_navigation.scss +++ b/src/assets/scss/modules/_navigation.scss @@ -19,77 +19,6 @@ display: none; // prevents repaint caused by JS hiding menu onload } -.off-canvas { - > ul.menu { - height: 100vh; - padding: 1rem; - - a { - color: $white; - font-weight: 600; - font-size: rem-calc(15); - } - } - - .menu .active > a { background-color: #ccc; } - -} - -.title-bar-title { - a { - font-size: 1rem; - color: #B9B9B9; - } -} - -.mobile-menu, -.mobile-off-canvas-menu { - - .menu .is-active > a { - background-color: lighten($dark-nav-color, 5%); - } -} - -// Tablet and desktop menu - -.top-bar { - - .top-bar-title a { - font-size: 1rem; - color: #B9B9B9; - padding-left: 1rem; - line-height: 1.8; - } - - .menu a { - color: #e6e6e6; - padding-top: 0; - padding-bottom: 0; - font-weight: bold; - font-size: 0.8rem; - line-height: 1; - - &:hover:not(.button) { - background-color: #42525D; - } - } - - .menu .active > a { background-color: #ccc; } - - .menu>li:not(.menu-text)>a { padding: 1rem; } - .menu li:not(:last-child) { border-right: 1px solid #4e4e4e; } - - .dropdown.menu .submenu { border: 0; } - .dropdown.menu .has-submenu.is-down-arrow a { padding-right: 1rem; } - .dropdown.menu .has-submenu.is-down-arrow > a::after { border: 0; } - .dropdown.menu:first-child > li.is-dropdown-submenu-parent > a::after { display: none; } -} - -.site-navigation { - @include breakpoint(small only) { - padding: 0; // prevents container visibility on small screens - } -} // WP post navigation .post-navigation { From 1e9a5ad1f6fae1e817e9a73d2655b89ac2113abe Mon Sep 17 00:00:00 2001 From: derweili Date: Fri, 1 Mar 2019 18:52:26 +0100 Subject: [PATCH 2/2] mobile nav toggle refactored now toggling the whole top bar instead of a the mobile nav inside the top-bar-right according to the foundation-sites docs https://foundation.zurb.com/sites/docs/top-bar.html --- header.php | 2 +- library/navigation.php | 4 ++-- src/assets/scss/modules/_navigation.scss | 8 +------- template-parts/mobile-top-bar.php | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/header.php b/header.php index 888317c18..09e4624db 100644 --- a/header.php +++ b/header.php @@ -32,7 +32,7 @@ -