Config.php - custom panel stylesheet hide

Hi,

How can I hide in the config.php the stylesheet: ‘c::set(‘panel.stylesheet’, ‘/assets/css/custom-panel.css’);’ when I logged in with admin credentials?

Thanks for your help.

if(kirby()->site()->user() && kirby()->site()->user()->role() != 'admin') {
  c::set('panel.stylesheet', 'assets/css/panel-styles.css');
}
2 Likes

This doesn’t work.
When I go to the Panel with customer account I don’t see any changes from the custom-panel.css

How can I resolve this?