Custom CSS not working in Kirby 3

Hi! Long time Kirby user here, I’m a graphic designer and not a developer :slight_smile:
I’m currently updating my Kirby site from Kirby 2 to 3 (I know, long overdue).

I’m working on a local version and started from scratch with the Lemmon template (the one I’ve been using for years).

I copied my css file (previously hosted in the assets folder) to the static folder, since it seems to be the new location for such files. I’ve also updated the both in default.twig and header.php, however it seems my css is not parsed. Alternatively I’ve also tried copying the css file to the assets kirby/assets folder and updated the links accordingly, but it didn’t work.

I’ve also tried copying the code directly into master.css, or to the style tag in header.php, with no results. The console only shows styles parsed from master.css.
I have of course tried to empty the cache in two different browsers, and to restart MAMP… to no avail.

I know this issue is probably very basic, but it used to work fine in Kirby 2 and I can’t find a workaround… thanx in advance!

No idea what the static folder is (not a Kirby default folder, maybe part of the theme your are using?), but basically, you are free to place your assets anywhere in the doc root, as long as you make sure to use the correct path to your files. Standard is still the assets folder.

If this theme is publicly available, it would make sense to post a link to it. If it is behind a paywall, that’s another story and you should probably contact the theme author.

Indeed, I forgot to put the link to the Lemmon theme.

Ok, so in default.twig the /static/master.css stylesheet is loaded. This file is obviously generated from the source css files in the src folder.

So nothing Kirby specific here.

So if you use your own css files and you are not familiar with the build step in the theme, then you can put them into the static folder and require them in addition to the master.css file.

Hi @texnixe, your reply helped me figure out what went wrong. I am posting it here in case someone needs it: the src folder was missing, so I reinstalled the template and it turns out my first build of the template was incomplete. Re-running the install with composer took care of it.
Many thanks for your assistance,
s.