WP-SCSS
Compiles .scss files on your wordpress install using ScssPhp . Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing. The plugin only compiles when changes have been made to the scss files. Compiles are made to the matching css file, so disabling
Compiles .scss files on your wordpress install using ScssPhp . Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.
The plugin only compiles when changes have been made to the scss files. Compiles are made to the matching css file, so disabling this plugin will not take down your stylesheets. In the instance where a matching css file does not exist yet, the plugin will create the appropriate css file in the css directory.
Get detailed instructions on github
- 01Upload plugin to plugins directory
- 02Active plugin through the ‘Plugins’ menu in WordPress
- 03Configure plugin options through settings page settings -> WP-SCSS .
Frequently asked questions.
Can I use a child theme?
Yes, absolutely. Make sure you define your directories relative to your child theme and that your child theme is active. Otherwise you’ll see an error regarding missing directories.
What version of PHP is required?
PHP 7.2 is required to run WP-SCSS
How do I @import subfiles
You can import other scss files into parent files and compile them into a single css file. To do this, use @import as normal in your scss file. All imported file names must start with an underscore. Otherwise they will be compiled into their own css file.
When importing in your scss file, you can leave off the underscore.
@import 'subfile';
Can I configure the plugin in code?
Yes. Define WP_SCSS_OPTIONS in wp-config.php as an array using the same keys as the settings page (base_compiling_folder, scss_dir, css_dir, cache_dir, compiling_options, sourcemap_options, errors, enqueue, always_recompile). The keys you set override the saved settings. See the readme on GitHub for an example.