Currently, I am working with ant.design to build my navbar. By default, the menu items in ant design have a blue-ish underline when selected or hovered over. However, I want to change this underline color to match the overall design of my project. I was successful in changing the underline color for selected items by targeting a specific class:
&& .ant-menu-item-selected::after{
border-bottom: 2px solid #659e38 !important;
}
Now, I also want to change the underline color when hovering over an item. But simply targeting the menu item like this:
&& .ant-menu-item:hover{
border-bottom: 2px solid #659e38 !important;
}
This approach gives me an undesired outcome depicted here: https://i.sstatic.net/xj1ne.png
How can I achieve the desired result? It's important to note that I'm using styled.components for styling.