PHPackages                             bugo/dart-sass-compiler - 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. bugo/dart-sass-compiler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bugo/dart-sass-compiler
=======================

PHP compiler for SCSS/Sass to CSS

0.3(2mo ago)02[1 issues](https://github.com/dragomano/dart-sass-compiler/issues)MITPHPPHP ^8.2CI passing

Since Jan 30Pushed 1mo agoCompare

[ Source](https://github.com/dragomano/dart-sass-compiler)[ Packagist](https://packagist.org/packages/bugo/dart-sass-compiler)[ RSS](/packages/bugo-dart-sass-compiler/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (4)Dependencies (10)Versions (4)Used By (0)

Sass/SCSS PHP Compiler
======================

[](#sassscss-php-compiler)

[![PHP](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)[![Coverage Status](https://camo.githubusercontent.com/68d03acc53ddf7c816738392e6c9e19ab0b997bf751a4eb9b3377597637173a0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f647261676f6d616e6f2f736373732d7068702f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/dragomano/scss-php?branch=main)

Features
--------

[](#features)

- Sass and SCSS compilation to CSS
- `@use`, `@forward`, `@import`, built-in Sass modules, and modern color functions
- Optional source maps and rule splitting
- PSR-3 logging for `@debug`, `@warn`, and `@error`
- PSR-16 support for caching compiled files
- Replaceable color engine via `ColorBundleInterface`

---

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require bugo/scss-php
```

Usage examples
--------------

[](#usage-examples)

### Compiling from a string

[](#compiling-from-a-string)

```
