In the new nav widget, I faced a challenge and decided to share it with you. First of all, please see the image below.
As you can see in the image above, the nav content has border radius on 4 sides. Also, nav item has 1px bprder bottom. The caret feature is also active for this dropdown.
I set the background color of the item to change when the item is hover over. But the problem here is that when I hover over the item, it causes the border radius of the content to be ignored. (The image below)
this is actually harder than I initially thought. The easy fix I was thinking about was to just add an overflow of hidden to the sub menus. But this would break nested sub menus. So at the moment you have the following options:
1. If you have only one level of sub menus you can go the overflow route using some custom CSS:
root .sub-menu { overflow: hidden }
2. If you have multiple levels you can do the following:
2a. Set the sub menu’s background-color to transparent. Set the background-color (default and hover) you want to use on your sub menu items instead.
2b. Set the border-radius using some custom CSS:
Hi Chris,
It is almost impossible to implement a general solution for this, as it depends heavily on how your menu is structured (number of submenus etc.). André’s suggestion is a good option, as far as I can see.