PHPackages                             axllent/silverstripe-scss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. axllent/silverstripe-scss

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

axllent/silverstripe-scss
=========================

A wrapper for scssphp to integrate scss compiling directly into Silverstripe

2.1.2(1y ago)614.6k3[1 issues](https://github.com/axllent/silverstripe-scss/issues)6MITPHP

Since Jan 14Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/axllent/silverstripe-scss)[ Packagist](https://packagist.org/packages/axllent/silverstripe-scss)[ Docs](https://github.com/axllent/silverstripe-scss)[ RSS](/packages/axllent-silverstripe-scss/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (25)Used By (6)

ScssPHP compiler for Silverstripe
=================================

[](#scssphp-compiler-for-silverstripe)

A wrapper for [scssphp](https://scssphp.github.io/scssphp/) to integrate [SCSS](http://sass-lang.com/) compiling directly into Silverstripe.

SCSS files are only compiled when needed, or when a `?flush` is done.

Features
--------

[](#features)

- Integrates [scssphp](https://scssphp.github.io/scssphp/) seamlessly into Silverstripe
- Includes flushing option (`?flushstyles`) to regenerate CSS stylesheets (ie. force undetected SCSS changes with @import). Note: this only applies to sites in `dev` mode. Alternatively use `?flush` to flush everything including stylesheets.
- Writes processed `*.scss` files into `assets/_css/` and automatically modifies `Requirements` paths
- Allows custom global variables to be passed through to SCSS compiling (yaml configuration)
- Basic support for `$ThemeDir` (eg: `url('#{$ThemeDir}/images/logo.png')` (see [Configuration](docs/en/Configuration.md))
- Automatic compression of CSS files when in `live` mode (may require an initial `?flush`)
- Adds any processed `editor.scss` files to TinyMCE (must be included in your front-end template)
- Source maps (either inline or file) in `dev` mode only, can be disabled

Requirements
------------

[](#requirements)

- Silverstripe ^5 || ^6

Installation
------------

[](#installation)

```
composer require axllent/silverstripe-scss

```

Usage
-----

[](#usage)

You need refer to your SCSS files by their full SCSS file names (eg:`stylesheet.scss`).

Example
-------

[](#example)

```
