Site logo

Archived topic

How to make SASS work with my child theme

3 replies · Started by eduard sans on November 30, 2018

Viewing posts 1–4 of 4

Hi! I would like to know how to make SASS running in a generatepress child theme. I've found tutorials only for new websites but my problem is that I have my website already done, and I would like to change my quite large CSS into modular SCSS for a better maintenance on the long-run.

Could someone kindly provide a step-by-step guide on how to do that?

Thanks in advance!

Hi Tom! I checked that post before, and I did again just in case I get a clearer idea but the thing is that for starters, the parent theme they put as an example has a scss folder already while generatepress doesn't. And I don't know how that might affect to this whole structure. Also, from what I read in other sources, it feels like this example is quite complex (this guy enqueues and dequeues quite some files), or I just don't get it.

Isn't there a simpler way? I would like to know what to specifically write in the functions.php (for example) to make it load a "style.scss" file instead of the single "style.css" I have in my child theme and not give me an error. By, at least, loading a single .scss file in my child theme, I could then import from that file to other modules. That would be already a start xD. Am I explaining right?

I don't think that's how it works, but I don't have a ton of experience with it, currently.

From my understanding, SCSS simply allows you to better organize/maintain your CSS. You would still need to compile it into a CSS file when you make changes, which you would then enqueue.

This archived topic is closed to new replies.