Changing the app bar color

Product: PowerShell Universal
Version: 1.4.6

Hi, trying to change the top bar with the nav button to be red instead of blue. I’ve tried a custom stylesheet:

New-UDDashboard -Pages $pages -Stylesheets @('/assets/style.css')
.MuiAppBar-colorPrimary {
    background-color: red;
}

This didn’t seem to do anything, so I tried with a New-UDStyle:

New-UDStyle -Style '.MuiAppBar-colorPrimary { background-color: red; }' -Content {
    New-UDDashboard -Pages $pages
}

No change with this either. Any suggestions?

Thanks!

Hi,
try !important

.MuiAppBar-colorPrimary {
    background-color: #ffffff !important;
}

if that is not working: did you publish the folder where the css file is located?

1 Like

That did it, thanks! I’d never seen that ‘!important’ before in CSS, so I overlooked it when going through the docs. Now I know next time. Thank you very much @psott!