Until now I knew that you can access CSS-values from the panel by placing an inline-style to a given element in your template. Or by making predefined classes accessible through a select field. While this is fine, it doesn’t give you full control of your CSS in your panel. Adding inline-styles in your template is not an option if you want to tweak a lot of options. And predefined classes don’t allow to change the value behind a class.
So, the obvious solution is:
Put your whole CSS in a snippet, wrap it into ‘style’ -tags and place your new ‘style’-snippet in the head of your site instead of a “real” CSS-stylesheet.
Now this allows you to grab every single CSS-value in your panel without the need to use inline-styles in your template (in fact now you have one big inline-style) and without the restrictions of predefined classes.
I’m posting this here, because I’m really excited about this discovery and because I read nowhere before about this simple approach. If this is a well-known thing I highly suggest this for the Kirby Cookbook, I would offer to write it. Maybe there are some drawbacks? Anyways, I am glad if this is helpful to anybody.