PHPackages                             lausek/scssphp - 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. [Templating &amp; Views](/categories/templating)
4. /
5. lausek/scssphp

ActiveLibrary[Templating &amp; Views](/categories/templating)

lausek/scssphp
==============

scssphp is a compiler for SCSS written in PHP.

v1.8.1(4y ago)0341MITPHPPHP &gt;=5.6.0

Since Jun 5Pushed 2y agoCompare

[ Source](https://github.com/lausek/scssphp)[ Packagist](https://packagist.org/packages/lausek/scssphp)[ Docs](http://scssphp.github.io/scssphp/)[ RSS](/packages/lausek-scssphp/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (9)Versions (27)Used By (1)

scssphp
=======

[](#scssphp)

###

[](#httpsscssphpgithubioscssphp)

[![Build](https://github.com/scssphp/scssphp/workflows/CI/badge.svg)](https://github.com/scssphp/scssphp/workflows/CI/badge.svg)[![License](https://camo.githubusercontent.com/1fc4ee7490724305ee3cb3722bb78cdcde20c61e2c1b2dbd81138b8a34deb01a/68747470733a2f2f706f7365722e707567782e6f72672f736373737068702f736373737068702f6c6963656e7365)](https://packagist.org/packages/scssphp/scssphp)

`scssphp` is a compiler for SCSS written in PHP.

Checkout the homepage, , for directions on how to use.

Running Tests
-------------

[](#running-tests)

`scssphp` uses [PHPUnit](https://github.com/sebastianbergmann/phpunit) for testing.

Run the following command from the root directory to run every test:

```
vendor/bin/phpunit tests

```

There are several tests in the `tests/` directory:

- `ApiTest.php` contains various unit tests that test the PHP interface.
- `ExceptionTest.php` contains unit tests that test for exceptions thrown by the parser and compiler.
- `FailingTest.php` contains tests reported in Github issues that demonstrate compatibility bugs.
- `InputTest.php` compiles every `.scss` file in the `tests/inputs` directory then compares to the respective `.css` file in the `tests/outputs` directory.
- `SassSpecTest.php` extracts tests from the `sass/sass-spec` repository.

When changing any of the tests in `tests/inputs`, the tests will most likely fail because the output has changed. Once you verify that the output is correct you can run the following command to rebuild all the tests:

```
BUILD=1 vendor/bin/phpunit tests

```

This will compile all the tests, and save results into `tests/outputs`. It also updates the list of excluded specs from sass-spec.

To enable the full `sass-spec` compatibility tests:

```
TEST_SASS_SPEC=1 vendor/bin/phpunit tests

```

Coding Standard
---------------

[](#coding-standard)

`scssphp` source conforms to [PSR12](https://www.php-fig.org/psr/psr-12/).

Run the following command from the root directory to check the code for "sniffs".

```
vendor/bin/phpcs --standard=PSR12 --extensions=php bin src tests *.php

```

Static Analysis
---------------

[](#static-analysis)

`scssphp` uses [phpstan](https://phpstan.org/) for static analysis.

Run the following command from the root directory to analyse the codebase:

```
make phpstan

```

As most of the codebase is composed of legacy code which cannot be type-checked fully, the setup contains a baseline file with all errors we want to ignore. In particular, we ignore all errors related to not specifying the types inside arrays when these arrays correspond to the representation of Sass values and Sass AST nodes in the parser and compiler. When contributing, the proper process to deal with static analysis is the following:

1. Make your change in the codebase
2. Run `make phpstan`
3. Fix errors reported by phpstan when possible
4. Repeat step 2 and 3 until nothing gets fixed anymore at step 3
5. Run `make phpstan-baseline` to regenerate the phpstan baseline

Additions to the baseline will be reviewed to avoid ignoring errors that should have been fixed.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~19 days

Total

25

Last Release

1693d ago

PHP version history (2 changes)1.0.0PHP ^5.6.0 || ^7

1.0.4PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32076279?v=4)[Laurin](/maintainers/lausek)[@lausek](https://github.com/lausek)

---

Top Contributors

[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (718 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (683 commits)")[![Cerdic](https://avatars.githubusercontent.com/u/342805?v=4)](https://github.com/Cerdic "Cerdic (440 commits)")[![leafo](https://avatars.githubusercontent.com/u/15198?v=4)](https://github.com/leafo "leafo (219 commits)")[![oyejorge](https://avatars.githubusercontent.com/u/1043524?v=4)](https://github.com/oyejorge "oyejorge (20 commits)")[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (15 commits)")[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (14 commits)")[![dleffler](https://avatars.githubusercontent.com/u/83437?v=4)](https://github.com/dleffler "dleffler (6 commits)")[![vladimmi](https://avatars.githubusercontent.com/u/891830?v=4)](https://github.com/vladimmi "vladimmi (4 commits)")[![devdot](https://avatars.githubusercontent.com/u/3763567?v=4)](https://github.com/devdot "devdot (4 commits)")[![okj579](https://avatars.githubusercontent.com/u/40447?v=4)](https://github.com/okj579 "okj579 (3 commits)")[![lausek](https://avatars.githubusercontent.com/u/32076279?v=4)](https://github.com/lausek "lausek (3 commits)")[![caiosm1005](https://avatars.githubusercontent.com/u/4460538?v=4)](https://github.com/caiosm1005 "caiosm1005 (3 commits)")[![gwillings](https://avatars.githubusercontent.com/u/4246446?v=4)](https://github.com/gwillings "gwillings (3 commits)")[![nextend](https://avatars.githubusercontent.com/u/4518540?v=4)](https://github.com/nextend "nextend (3 commits)")[![shyim](https://avatars.githubusercontent.com/u/6224096?v=4)](https://github.com/shyim "shyim (3 commits)")[![TimWolla](https://avatars.githubusercontent.com/u/209270?v=4)](https://github.com/TimWolla "TimWolla (3 commits)")[![brainfoolong](https://avatars.githubusercontent.com/u/1684236?v=4)](https://github.com/brainfoolong "brainfoolong (3 commits)")[![sergeylukin](https://avatars.githubusercontent.com/u/720339?v=4)](https://github.com/sergeylukin "sergeylukin (2 commits)")[![aaukt](https://avatars.githubusercontent.com/u/5297402?v=4)](https://github.com/aaukt "aaukt (2 commits)")

---

Tags

csssassscsslessstylesheet

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lausek-scssphp/health.svg)

```
[![Health](https://phpackages.com/badges/lausek-scssphp/health.svg)](https://phpackages.com/packages/lausek-scssphp)
```

###  Alternatives

[almasaeed2010/adminlte

AdminLTE - admin control panel and dashboard that's based on Bootstrap 4

45.3k8.5M138](/packages/almasaeed2010-adminlte)[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62827.7M220](/packages/scssphp-scssphp)[panique/php-sass

Compiles your SASS .scss files to .css every time your run your app (in development)

12280.0k](/packages/panique-php-sass)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
