I can’t use a custom css on the panel. I don’t know exactly why. I put the following code in my config.php
and placed a css with some edits in assets/css/panel.css, I also tried to put it in panel/assets/css/panel.css but nothing happens to the login form.
What is wrong?
Could be a cache issue ?
If you open the devtools of your browser: do you see the stylesheet added in the
there is just the standard panel.min.css with the version number behind it and the absolute path to it (which is located inside the panel folder)
Your custom stylesheet does not go into the
/panel folder. Make sure that your filename and the path to the file are really correct.
I got my css already inside the normal assets folder under css but the stylesheet won’t load
Hm, what is your Kirby version?
Where do I find the version?
You can put
<?= $kirby->version() ?>
e.g in a template.
Or do a file search for “version” in your editor of choice, it’s somewhere in the
Ok, then that’s up to date. Running out of ideas, because it usually works without any issues.
Could you test in your environment with a fresh Starterkit?
If you have any plugins installed, maybe something is interfering…
Ok, I’ve found the issue.
It’s the kirby-analytics-dashboard plugin. It adds some script to the panel. When I disable the plugin, everything works. How can I manage to get both to work?
Hm, sorry, I’m not familiar with that plugin. Please try to contact the plugin developer.
This is because the plugin is overriding the
panel.stylesheet option here.
It was probably made that way because in K2 you couldn’t load CSS in the panel from anything but a field. So, a solution would be to:
- Keep this code but merge the option instead of replacing it completely
- Inline the widget styling (probably the best solution)
- Import those stylesheets in your own panel CSS
Then get rid of the lines highlighted above