I come here because Iâve got a problem with the sass plugin. Itâs not working despite the fact that I feel like Iâve done everything required.
âscssphpâ folder is inside âpluginsâ Kirbyâs folder.
'scss.phpâ is inside âsnippetsâ Kirbyâs folder.
The SCSS snippet <?php snippet('scss') ?> is in my HTML head.
There is a folder âscssâ inside Kirbyâs assets folder.
Iâve created a file âdefault.scssâ and place it inside âassets/scssâ.
The folder âassets/cssâ exists on the server.
I added c::set(âscssNestedCheckâ, true); to the config. (The site/config/config.php file, right ?)
Then. How do I call the scss file in the page ? Like a normal css file, by its url ? Or do I have to link to an .css with the same name that the .scss file, and the plugin understand that in fact, it has to transform the scss to css ? But in that case, should all the css/scss rules be in the .scss file or the .css ?
Iâm a bit lost, on surely, the easiest part, but since itâs not described in the doc I canât really figure out what Iâm doing wrong.
Ok, thanks, iâm going to try this right now. : ) two last newbie questions, does this mean that I have to already create an empty default.css ? & Can I change the âdefaultâ name by something else without modify the plugin itself ?
Iâm not quite sure, the documentation says it will overwrite an existing file, but I would assume that it created a new file if it doesnât exist yet.
Maybe a problem with permissions or ownership so that the file canât be written? I have never used the plugin, so itâs hard to tell. Iâll invite the developer to this discussion.
I know this is not answering your question, but why donât you âcompileâ the sass-files locally using grunt or gulp? Whatâs the advantage of doing this with php on your server?