Importing sass into underscores theme

I am developing a new theme using Underscores. I am starting the process of migrating in the code from the already built site in html/css. I built it using .scss files and am not sure where to copy in my main styles. I see there is a Sass directory already in underscores, but do I then still need to enque the .scss file.

Sorry, I'm obviously a bit confused how to handle sass and wordpress....any help is appreciated.

Thanks

Topic sass theme-development Wordpress

Category Web


Underscores is primarily built so that you put your styles in style.css. This stylesheet is compiled from the main SASS file at sass/style.scss. Additionally, woocommerce.css is compiled from sass/woocommerce.scss.

If you want to take advantage of SASS yourself, you can either add your styles to sass/style.scss, or import a file into it that has your styles. You can see that it already imports some other files from the sass/ directory, as an example.

However, you should not enqueue the .scss file. Browsers cannot read SASS, so the .scss file needs to be compiled into the style.css file. Underscores does not provide any tools for doing this though, so you would need to add your own build tools for compiling SASS so that sass/style.scss can be compiled to style.css. If you're previous HTML site was built with SASS, then whatever process you used to compile the stylesheet would also work here.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.