WordPress / wporg-parent-2021

21 stars 11 forks source link

Navigation: Bold only the direct child of the current-menu-item li #63

Closed ryelle closed 1 year ago

ryelle commented 1 year ago

In https://github.com/WordPress/wporg-parent-2021/commit/40f4a3dba3e477502ca7fbe5a82f986828eb239d, the fix for https://github.com/WordPress/wporg-parent-2021/issues/55, the CSS added was a little overly broad. It applies to all nested links in the current menu item's li, which also includes submenus. This caused the dropdowns in the global nav to all be bold. This PR restricts that bold style to just the direct child link.

Fixes https://github.com/WordPress/wporg-mu-plugins/issues/306

Screenshots

Before, the dropdown items are all bold. After, only the current item is bold, but the menu item in the subnav is still correctly highlighted.

Before After
Screen Shot 2022-12-09 at 17 13 37 Screen Shot 2022-12-09 at 17 13 27