Awesome
A Sass compiler for WordPress ! This plugin allows you to enqueue .scss
styles, edit variables from your dashboard. CSS will be compiled if modifications occured.
It uses the scssphp Compiler.
Installation
- Download the last release
- Unzip it into your wp-content/plugins directory
- Activate the plugin in WordPress
Documentation
How to use
-
Register and enqueue your Sass sheets the same way you would do for your CSS.
wp_enqueue_style( 'my-sass-handle', 'http://example.com/css/mystyle.scss', $deps, $ver, $media );
-
Configure the plugin with the
sass_configuration
filter.add_filter( 'sass_configuration', 'my_sass_config' ); function my_sass_config( $defaults ) { return array( 'variables' => array( 'sass/_variables.scss' ), 'imports' => array( 'sass/bootstrap.scss', 'sass/_theme.scss' ) ); }
Configuration of the plugin is optional, but you should at least register your variables if you are using a CSS framework.
-
Set a Sass variable value
sass_set( $variable, $value );
-
Get a Sass variable value
sass_get( $variable );
Contributors
Contributors are more than welcome !
License
WTFPL – Do What the Fuck You Want to Public License