Skip to content

Commit

Permalink
Merge pull request #37 from wri/menu-woes
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoppenhaver committed Dec 14, 2021
2 parents 0fd037a + 38712fd commit 019cba6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions themes/custom/ts_wrin/sass/global/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ header {
}
.tray-toggle.language-toggle svg {
width: 28px;
}
}
.tray-toggle.filter-toggle {
position: relative;
border-radius: 5px;
Expand Down Expand Up @@ -437,7 +437,7 @@ header nav.menu--main.has-active-trail .menu-wrapper > ul.menu {
outline: none;
}
}
& > li > .menu-item-title a {
& > li > a {
@include font($caslon, "normal", "italic");
@include font-line-height(15, 15);
margin-right: $space-xs;
Expand Down
8 changes: 7 additions & 1 deletion themes/custom/ts_wrin/sass/global/_ts-hamburger-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ body.fixed {
margin-top: 24px;
}
}
& > ul.menu > li > .menu-item-title {
& > ul.menu > li > .menu-item-title a {
display: block;
margin-bottom: 22px;
position: relative;
Expand All @@ -326,6 +326,7 @@ body.fixed {
center / cover;
color: $brand-gold;
content: "";
cursor: pointer;
display: block;
height: 14px;
position: absolute;
Expand Down Expand Up @@ -404,12 +405,17 @@ body.fixed {
display: block;
margin-bottom: 22px;
}

a {
display: block;
}
}
& > li > .menu-item-title:after {
background: transparent url("../img/svgs/arrow-gold.svg") no-repeat center
center / cover;
color: $brand-gold;
content: "";
cursor: pointer;
display: block;
height: 14px;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion themes/custom/ts_wrin/ts_wrin.theme
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function ts_wrin_preprocess_block(array &$variables) {
];
if ($variables['plugin_id'] == 'menu_block:main' && isset($variables["content"]["#items"])) {
foreach ($variables["content"]["#items"] as $item) {
if ($item['in_active_trail']) {
if ($item['in_active_trail'] && $item['is_expanded']) {
$variables['attributes']['class'][] = 'has-active-trail';
break;
}
Expand Down

0 comments on commit 019cba6

Please sign in to comment.