Skip to content

Commit

Permalink
release: small fixes
Browse files Browse the repository at this point in the history
### Bug Fixes
- **Fixed menu items** where long item names with a dropdown on the mobile were overlapping with the dropdown button.
### Improvements
- **Updated internal dependencies**
  • Loading branch information
preda-bogdan authored Apr 5, 2024
2 parents 3315c1c + 569c00a commit bf44cd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions e2e-tests/specs/customizer/hfg/hfg-menu-item-wrap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@ test.describe('Menu item alignment', function () {
.getByRole('link', {
name: 'Level 3b',
});

// Check that a toggle menu has proper padding.
const toggleItemLink = page.getByRole('link', {
name: 'About The Tests',
});
await expect(toggleItemLink).toHaveCSS('padding-right', '46px');
});
});
2 changes: 1 addition & 1 deletion inc/views/nav_walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function get_mobile_caret_style() {
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li .wrap a .dd-title { width: var(--wrapdropdownwidth); }';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li .wrap button { border: 0; z-index: 1; background: 0; }';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li:not([class*=block]):not(.menu-item-has-children) > .wrap > a { padding-right: calc(1em + (18px*2)); text-wrap: wrap; white-space: normal;}';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li.menu-item-has-children:not([class*=block]) > .wrap > a { margin-right: calc(-1em - (18px*2));}';
$mobile_button_caret_css .= '.header-menu-sidebar .nav-ul li.menu-item-has-children:not([class*=block]) > .wrap > a { margin-right: calc(-1em - (18px*2)); padding-right: 46px;}';

return Dynamic_Css::minify_css( $mobile_button_caret_css );
}
Expand Down

0 comments on commit bf44cd2

Please sign in to comment.