primeng
primeng copied to clipboard
MenuModule items don't get active styling
Describe the bug
I am using PrimeNg with theme-base and my-theme.
routerLinkActive is not working since p-menuitem-link-active does not exist in _mixins.scss
It would require something like this:
@mixin menuitem {
> .p-menuitem-content {
...
.p-menuitem-link-active {
color: $menuitemTextActiveColor;
background-color: $menuitemActiveBg;
.p-menuitem-text {
color: $menuitemTextActiveColor;
}
.p-menuitem-icon {
color: $menuitemIconActiveColor;
}
.p-submenu-icon {
color: $menuitemIconActiveColor;
}
}
...
}
}
Environment
Ubuntu / Angular / PrimeNg / Prime Sass Themes
Reproducer
No response
Angular version
16.2.3
PrimeNG version
16.3.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.17.1
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
Menu items which use routerLink should get correct styling (color, background-color, etc) when the route matches the current route and due to that .p-menuitem-link-active is applied
Is there an update on this?