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

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

mediawiki/scss
==============

Allows using SCSS files for MediaWiki styling

5.0.0(4mo ago)566.7k—7.8%3[3 PRs](https://github.com/ProfessionalWiki/SCSS/pulls)1GPL-3.0-or-laterPHPPHP &gt;=8.1CI passing

Since Apr 28Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/ProfessionalWiki/SCSS)[ Packagist](https://packagist.org/packages/mediawiki/scss)[ Docs](https://github.com/ProfessionalWiki/SCSS)[ GitHub Sponsors](https://github.com/JeroenDeDauw)[ RSS](/packages/mediawiki-scss/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (22)Used By (1)

MediaWiki SCSS library
======================

[](#mediawiki-scss-library)

[![GitHub Workflow Status](https://camo.githubusercontent.com/1f4c6be10311fe07efa6c7c2862065f47f2a9f08019043e432f818e234420668/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f50726f66657373696f6e616c57696b692f534353532f63692e796d6c3f6272616e63683d6d6173746572)](https://github.com/ProfessionalWiki/SCSS/actions?query=workflow%3ACI)[![Latest Stable Version](https://camo.githubusercontent.com/c28aecccea5c0a4383f5a29d38ea8657b8ac4c42832eeebebcca836182bc2b5b/68747470733a2f2f706f7365722e707567782e6f72672f6d6564696177696b692f736373732f762f737461626c65)](https://packagist.org/packages/mediawiki/scss)[![License](https://camo.githubusercontent.com/493c59d9d514773bb414bf0884ab1fcf49bb3ca8693665d9b31d842e06b3f98e/68747470733a2f2f706f7365722e707567782e6f72672f6d6564696177696b692f736373732f6c6963656e7365)](https://packagist.org/packages/mediawiki/scss)

The MediaWiki SCSS library provides a ResourceLoader module capable of compiling [SCSS](https://en.wikipedia.org/wiki/Sass_(stylesheet_language)).

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

[](#requirements)

- [PHP](https://php.net) 8.1 or later
- [MediaWiki](https://www.mediawiki.org/wiki/MediaWiki) 1.43 or later
- [Composer](https://getcomposer.org/)

Use
---

[](#use)

An SCSS module is defined much like any other style module. See the manual for [$wgResourceModules](https://www.mediawiki.org/wiki/Manual:$wgResourceModules). It should also be possible to add the module definition to the `extension.json`of a MediaWiki extension. See [Developing\_with\_ResourceLoader](https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader)

Some additional keys may be used:

- `class`: This is mandatory. It selects the class to be used for the module. For SCSS, the value has to be `'SCSS\\ResourceLoaderSCSSModule'`
- `styles`: It is not an additional key, but it has extended semantics. This key contains the list of the module's style files. Each file can optionally be given a position to influence the order in which the files are compiled. Allowed values for the position are

    1. `beforeFunctions`
    2. `functions`
    3. `afterFunctions`
    4. `beforeVariables`
    5. `variables`
    6. `afterVariables`
    7. `beforeMain`
    8. `main`
    9. `afterMain`

    If no position is given, `main` will be assumed.

    All files of one module will be compiled together, i.e., variables, mixins etc., will be shared between them.
- `variables`: An array of variables and values to override the SCSS variables in the style files. This allows changing values (e.g., colors, fonts, margins) without having to modify the actual style files.
- `cacheTriggers`: Compiling SCSS is expensive, so compiled results are cached. This option lists files that, when changed, will trigger flushing of the cache and re-compiling of the style files.

    All files on this list will be checked for each web request. To minimizes the load on the file system and the time to build the page, it is not advisable to add all style files to this list.

Here is an example definition:

```
$wgResourceModules[ 'ext.MyExtension.styles' ] = [

	'class' => 'SCSS\\ResourceLoaderSCSSModule',
	'localBasePath' => $localBasePath,
	'remoteBasePath' => $remoteBasePath,
	'position' => 'top',

	'styles' => [
		'modules/ext.MyExtension.foo.scss' => 'main',
		'modules/ext.MyExtension.bar.scss'
	],
	'variables' => [
		'red' => '#ff0000',
		'green' => '#00ff00',
		'blue' => '#0000ff',
	],
	'cacheTriggers' => [
		'LocalSettings.php',
		'composer.lock',
	],
];
```

The extension uses the [scssphp/scssphp](https://github.com/scssphp/scssphp)compiler, which has some limitations. See the [issue list](https://github.com/scssphp/scssphp/issues).

### Cache type

[](#cache-type)

`$egScssCacheType` can be set to request a specific cache type for the compiled styles. To disable caching of SCSS styles altogether (e.g., during development), set `$egScssCacheType = CACHE_NONE;`. This should never be done on a production site.

Professional Support
--------------------

[](#professional-support)

The SCSS extension is maintained by [Professional Wiki](https://professional.wiki). You can [contract us](https://professional.wiki/en/contact) to help you install or customize SCSS. We also do development work.

Running the tests
-----------------

[](#running-the-tests)

The tests can only be run when the library is loaded within MediaWiki. You can add it via `composer.local.json` (probably using `dev-master`).

Inside your MediaWiki root directory

```
php tests/phpunit/phpunit.php -c vendor/mediawiki/scss/phpunit.xml.dist

```

License
-------

[](#license)

You can use the SCSS extension under the [GNU General Public License, version 3](https://www.gnu.org/copyleft/gpl.html) (or any later version).

Release notes
-------------

[](#release-notes)

### Version 5.0.0

[](#version-500)

Released on 2025-12-20

- Raised minimum MediaWiki version from 1.39 to 1.43
- Raised minimum PHP version from 8.0 to 8.1
- Raised minimum `scssphp` version from 1.12.1 to 1.13.0
- Fixed MediaWiki 1.43 deprecations

### Version 4.0.0

[](#version-400)

Released on 2024-04-25

- Raised minimum MediaWiki version from 1.35 to 1.39
- Raised minimum PHP version from 7.4.3 to 8.0
- Raised minimum `scssphp` version from 1.10.2 to 1.12.1
- Modernized coding standards

### Version 3.0.1

[](#version-301)

Released on 2022-07-25

- Added preliminary compatibility with MediaWiki 1.39

### Version 3.0.0

[](#version-300)

Released on 2022-03-30

- Raised minimum MediaWiki version from 1.27 to 1.35
- Raised minimum PHP version from 5.6 to 7.4.3
- Raised minimum `scssphp` version from 1.5.2 to 1.10.2

### Version 2.0.8

[](#version-208)

Released on 2022-07-25

- Added preliminary compatibility with MediaWiki 1.39

### Version 2.0.7

[](#version-207)

Released on 2021-05-18

- Increased minimum version of `scssphp`

### Version 2.0.6

[](#version-206)

Released on 2021-05-15

- Temporarily limit the version of `scssphp` below 1.5 to avoid breaking changes

### Version 2.0.5

[](#version-205)

Released on 2020-12-27

- Added compatibility with MediaWiki 1.36

### Version 2.0.4

[](#version-204)

Released on 2020-09-07

- Switched to new version of `scssphp`

### Version 2.0.3

[](#version-203)

Released on 2020-09-07

- Temporarily fixed the version of `scssphp` to 1.1.1 to avoid the 1.2 bug

### Version 2.0

[](#version-20)

Released on 2020-04-19

- Turned MediaWiki extension into a standard PHP/Composer library
- Switched to new version of `scssphp`

### Version 1.0

[](#version-10)

Released on 2019-04-28

- Initial release

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance73

Regular maintenance activity

Popularity36

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity77

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 ~151 days

Recently: every ~311 days

Total

17

Last Release

149d ago

Major Versions

1.0 → 2.0.02020-04-19

2.0.7 → 3.0.02022-03-30

2.0.8 → 3.x-dev2022-07-25

3.0.1 → 4.0.02024-04-25

4.0.0 → v5.x-dev2025-12-20

PHP version history (4 changes)1.0PHP &gt;=5.6

3.0.0PHP &gt;=7.4.3

4.0.0PHP &gt;=8.0

v5.x-devPHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://www.gravatar.com/avatar/5d30e82252731745d5060a641de6e9431e1d5722ede97cb1cc94d2975aa54753?d=identicon)[malberts](/maintainers/malberts)

![](https://www.gravatar.com/avatar/05e03b274e4924bf511416ec2f343c76609b8f3856e1d7804fc96f1338ce5bc3?d=identicon)[s7eph4n](/maintainers/s7eph4n)

---

Top Contributors

[![malberts](https://avatars.githubusercontent.com/u/1428594?v=4)](https://github.com/malberts "malberts (47 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (34 commits)")[![s7eph4n](https://avatars.githubusercontent.com/u/2829850?v=4)](https://github.com/s7eph4n "s7eph4n (14 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![YOUR1](https://avatars.githubusercontent.com/u/3681016?v=4)](https://github.com/YOUR1 "YOUR1 (1 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")

---

Tags

librarymediawikiscssskinmediawikisassscssextensionwikiscssphpresouce loaderresouceloader

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mediawiki-scss/health.svg)

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

###  Alternatives

[panique/php-sass

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

12280.0k](/packages/panique-php-sass)[wapplersystems/ws-scss

SASS compiler for TYPO3

11134.0k4](/packages/wapplersystems-ws-scss)[mediawiki/vector-skin

Modern version of the MonoBook skin

533.5k](/packages/mediawiki-vector-skin)[mediawiki/bootstrap

Provides the Bootstrap 5 web front-end framework to MediaWiki skins and extensions

15102.0k5](/packages/mediawiki-bootstrap)[mediawiki/simple-batch-upload

Basic, no-frills uploading of multiple files to MediaWiki

2321.3k](/packages/mediawiki-simple-batch-upload)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)

PHPackages © 2026

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