WP-SCSS

Description

Compiles .scss files on your wordpress install using lefo’s 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

Installation

  1. Upload plugin to plugins directory
  2. Active plugin through the ‘Plugins’ menu in WordPress
  3. Configure plugin options through settings page settings -> WP-SCSS.

FAQ

Installation Instructions
  1. Upload plugin to plugins directory
  2. Active plugin through the ‘Plugins’ menu in WordPress
  3. Configure plugin options through settings page settings -> WP-SCSS.
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.

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';

Does this plugin support Compass?

Currently there isn’t a way to fully support compass with a php compiler. If you want limited support, you can manually import the compass framework. You’ll need both the _compass.scss and compass directory.

`compass / frameworks / compass / stylesheets /

@import 'compass';

Alternatively, you can include Bourbon in a similar fashion.

Can I use .sass syntax with this Plugin?

This plugin will only work with .scss format.

It’s not updating my css, what’s happening?

Do you have errors printing to the front end? If not, check your log file in your scss directory. The css will not be updated if there are errors in your sass file(s).

Make sure your directories are properly defined in the settings. Paths are defined from the root of the theme.

I’m having other issues and need help

If you are having issues with the plugin, create an issue on github, and we’ll do our best to help.

Reviews

Perfect, simple but perfect

One of the few plugins i’ve ever rated. It’s so simple, but adds so much value. Reloads extremely fast, never had an issue on multiple installs.

Amazing plugin. I use it as my default SCSS converter for each new project.

This plugin is amazing, especially now that there are source maps!

For our workflow, I develop on the server so that way people can upload content while I’m developing, which ends up saving time. It’s much nicer having this plugin automate the SCSS conversion for me, rather than having to set up a gulp script and run the command line each time I work on a project. This is always running – just refresh your page twice, and the compilation happens (one refresh to compile, the other refresh to see the results. Tip, use ctrl + r to refresh quickly).

This plugin has made my work so much more enjoyable. Thank you so much!

Love it

Making life so much easier. Excellent tool for developers.

Tried it in localhost

Hi, thank you for this plugin!

I tried it in my localhost.
I tried writing some scss code like import, partial, nesting and it worked great.
But after I tried to use my existing css with 28000+ lines, it took forever to load and I tried to delete code to 5000 lines and I found that it took very long to load (Before, it loaded in 2 seconds but after add 5000 lines it took 18 seconds).
I tried to unchecked the “Enqueue Stylesheets” options but no change in load time but it still slowing the load time(probably the plugin still compile the scss file even though I don’t use it). I deactivate the plugin and the load time became normal again. After some try, this error appear:
Fatal error: Maximum execution time of 180 seconds exceeded in C:\xampp\htdocs\project_name\wp-content\plugins\wp-scss\scssphp\src\Parser.php on line 875

I wonder if it was because the css file is too big or I made a mistake. I hope you can look about it. Thank you for your attention

Read all 40 reviews

Contributors & Developers

“WP-SCSS” is open source software. The following people have contributed to this plugin.

Contributors

Translate “WP-SCSS” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.2.4

  • Updated scssphp to version 0.7.5
  • Added source map @iannacone
  • Always define $wpscss_compiler in the global scope @jazbek

1.2.3

  • Updated scssphp to version 0.7.2 @hellerbenjamin
  • Removed depricated screen_icon()

1.2.2

  • Updated scssphp to version 0.6.6

1.2.1

  • Changed set version option to update if already exists

1.2.0

  • Fixed a bug where directory inputs were not getting sanitized @mmcev106
  • Made the missing directory warning also display if a specified path is a file @mmcev106
  • Added /vendor to .gitignore @mmcev106
  • Dont enqueue already enqueued stylesheets @bobbysmith007

1.1.9

  • Added filter to set variables via PHP @ohlle
  • Added option to minify CSS output @mndewitt

1.1.8

Various improvements from pull requests by @jbrains and @brainfork

1.1.7

  • Update scssphp to 0.0.12 – pull from #16 @GabrielGil

1.1.6

  • Upgraded scss.inc.php to version 0.0.10; via pull request from kirkhoff

1.1.5

  • Added option to only show errors to logged in users; via pull request from tolnem

1.1.4

  • Add suport for subfolders in scss directory

1.1.3

  • Hotfix for a accidental character

1.1.2

  • Added support for moved wp-content directories

1.1.1

  • Added error handling for file permissions issues
  • Changed error log to .log for auto updating errors

1.0.0

  • Initial Build