https://github.com/roborourke/wp-sass
Sass for WordPress
https://github.com/roborourke/wp-sass
Last synced: 12 months ago
JSON representation
Sass for WordPress
- Host: GitHub
- URL: https://github.com/roborourke/wp-sass
- Owner: roborourke
- Created: 2012-06-30T22:38:39.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2016-09-14T16:55:00.000Z (almost 10 years ago)
- Last Synced: 2025-06-28T16:12:06.237Z (12 months ago)
- Language: PHP
- Size: 129 KB
- Stars: 90
- Watchers: 15
- Forks: 24
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Enable Sass and Scss in WordPress
This plugin allows you to write and edit .sass and .scss files directly and
have WordPress do the job of compiling and caching the resulting CSS. It
eliminates the extra step of having to compile the files into CSS yourself
before deploying them.
## Installation:
If you are using git to clone the repository do the following:
git clone git://github.com/sanchothefat/wp-sass.git wp-sass
git submodule update --init --recursive
If you are downloading the zip or tar don't forget to download the phpsass
dependency too https://github.com/richthegeek/phpsass and copy it into the `phpsass`
folder.
## Usage:
You can either install the script as a standard plugin or use it as an include within a theme or plugin.
For use with themes add the following lines to your functions.php:
```php
```
Any registered styles with the .sass or .scss suffix will be compiled and the file URL
rewritten.
### Using PHP in .sass and .scss files
You can also create `.sass.php` or `.scss.php` files that will be preprocessed in the WordPress context.
What this means is that you can use WordPress functions within the stylesheets themselves eg:
```sass
$red: ;
body {
background: $red;
}
```
## Further Reading
[Read the Sass and Scss documentation here](http://sass-lang.com/)
## License
The software is licensed under the MIT license.