[Support request] How to make SASS work with my child theme

Home Forums Support [Support request] How to make SASS work with my child theme

Home Forums Support How to make SASS work with my child theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #744579
    eduard sans

    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!

    #745116
    Tom
    Lead Developer
    Lead Developer

    It’s quite the process I believe. This might help: https://stackoverflow.com/questions/25796987/how-to-compile-sass-in-a-wordpress-child-theme

    Let me know 🙂

    #745202
    eduard sans

    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?

    #745504
    Tom
    Lead Developer
    Lead Developer

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.