When building a WordPress theme with SCSS I like to split up my code into a series of folders and partials, following a logical structure. A useful feature of Gulp WP Toolkit is the ability to easily load all of the SCSS partials within a folder.
This is made possible by the gulp-sass-bulk-import package.
Your original SCSS file might look like this:
But using Gulp WP Toolkit, it can be rewritten as:
If you need to load a specific file first, then you can do so by adding an @import
statement before the wildcard @import
, like this:
Leave a Reply