Hey Leo.
Thanks so much for the quick turnaround.
I tested the solution in the link you sent me and it partially worked.
The first item of my sub-menu also had sub-menus,
and in this case the arrow on the right was going down.
The code only worked the way I wanted when I opened this first sub-menu.
It could be because I’m using the menu type:
[Click – menu item].
I didn’t get to test another type because I needed this one.
So I solved the issue by adapting the code you gave me.
It was like this:
.main-navigation ul ul {
inline-size: max-content;
}
But since I use a different color in the sub-levels of the menu,
I had to add another snippet so that the color fills the entire width:
.main-navigation ul ul ul {
inline-size: max-content;
width: auto;
}
Finally, I added this snippet that limits the maximum width of the menu.
.main-navigation:not(.slideout-navigation) ul.sub-menu {
max-width: 380px;
}
I hope can help others.
If you want see results, see private link below.