Can I custom color of menu ?

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
DCR_DM401
Posts: 26
Joined: 19 Nov 2016, 06:10

26 May 2017, 03:56

I use Ultima and create link by subsystem in app.menu.component.ts

It look can be set only label and icon, but I want to set background color or text color.
Do you know how to customize these setting?

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

26 May 2017, 15:40

Hi,

You can create new variables for your subsystem in variables.scss. In src/assets/layout/sass/main.scss
Line 264

Code: Select all

ul.ultima-menu {                
                li {
                    a {
                        color: #ffffff;
                        
                        i {
                            color: #ffffff;
                        }
                        
                        &:hover {
                            background-color: $darkMenuHoverColor;
                        }

                         &.active-menuitem-routerlink {
                            color: $darkMenuRouterLinkActiveColor;
                            
                            i {
                                color: $darkMenuRouterLinkActiveColor;
                            }
                            
                            &:hover {
                                color: #ffffff;
                                
                                > i {
                                    color: #ffffff;
                                }
                            }
                         }
                    }
                    
                    &.active-menuitem {
                        > a {
                            color: $accentTextColor;
                            background-color: $accentColor;
                        }
                    }
                }
            }    
You can change colors with your own colors and you can make additions.

Regards

DCR_DM401
Posts: 26
Joined: 19 Nov 2016, 06:10

29 May 2017, 07:49

Thank you for you reply.

But I want to color only specific menus.

For example,
System1
-SubsystemA
-SubsystemB
-SubsystemC

System2
-SubsystemD
-SubsystemE
-SubsystemF

SubsystemA is colored red;
other of System1 are white.
SubsystemB is colored blue;
other of System2 are green.

Can I realization on ULTIMA ?

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

29 May 2017, 16:10

Hi,

You can add your own classes for styling specific items.

Regards

DCR_DM401
Posts: 26
Joined: 19 Nov 2016, 06:10

31 May 2017, 03:16

Thank you!
I become to be able change color by add class property in item and add my css.

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

05 Jun 2017, 09:03

Glad to hear that.

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests