When setting color and background color on hover and CSS transition to submenu items links, there’s a glitch because background color is not applied to links but to li wrappers: there is no transition on background color changes.
I think background color should be applied to a tags and not li wrappers.
Quick fix:
.sub-menu li {
transition: var(--same-transition-as-submenu-links);
}
OK I understand
I was setting transition with this:
a {
transition: bla bla bla;
}
So it didn’t include li wrappers in menu, and I had no transition on background color.
But the CSS transition property on menu element seems to set BOTH transitions and a AND li wrappers. So it is not pure CSS, there is some processing behind it, isn’t there?
Is this CSS transition option specific for each element?
Yes time shift appears with nested elements like li a in some situations (when changing same inherited property, like text color, in both elements).
So, if background-color was applied to a tag instead of li, it would be healthier and safer.
But I guess we can live with that for now, since the menu transition works like that.