WordPress WordPress Basics WordPress Themes How to Find WordPress Themes

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,405 Points

Child Themes and SCSS

Hi,

Great class!

Does anyone have any idea on why it seems (unless I'm making some kind of mistake somewhere..) like some Wordpress themes take to child theme and SCSS, while others do not?

I managed to get a child theme going using Sass on the Twenty-fifteen theme, but I have not been able to do the same on a handful of others themes. Some don't create the child themes at all, while others do, but won't let me override the main styles with Sass.

I'm perplexed...lol..

Thanks in advance:-)

2 Answers

Sue Dough
Sue Dough
35,795 Points

Most WordPress themes do not use SASS/SCSS. You should look into grunt/gulp as a solution. You can set it up pretty easily. You could try using https://www.npmjs.com/package/grunt-sass .

Then I would reccomend setting up your gruntfile and node modules 1 layer outside of wordpress. You can have a sass folder and css folder in your theme. Then you can exclude the sass folder from getting deployed.

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,405 Points

First of all, let me say that I love your Gravatar!

I'm not (yet) familiar with Grunt, but I am somewhat familiar with Gulp (ie., as opposed to just using Sass to compile CSS on its own). Is there much of a difference between the two? Maybe I'll just go with Gulp for now, as I am already somewhat familiar with it...unless there is some advantage.

Thanks!

Sue Dough
Sue Dough
35,795 Points

They are both good. You can't go wrong with either in my opinion. Grunt syntax is more configuration like where gulp is code. Once you have it set up the way you want for your project you don't have to work on it too much again. You can do a lot of cool things like minifying your css/js and combining it. You can deploy. You can minify images. You can execute shell scripts etc. It is really good stuff.