Skip to content

Installation

Requirements

  • Drupal 10.2 or later, Drupal 11, or Drupal 12.
  • PHP 8.1 or later, as Drupal and scssphp require (Drupal 12 needs PHP 8.5).
  • scssphp/scssphp 2.x and league/uri 7.x. Composer installs both with the module.

Install with Composer

composer require drupal/scss
drush en scss

The module must be installed with Composer. Earlier releases could load scssphp from sites/all/libraries; that is no longer supported.

Permissions

The settings page needs the Administer SCSS Compiler permission (administer scss). It is a restricted permission, because whoever holds it chooses which directories the web server reads SCSS from and writes CSS into. Grant it only to trusted roles.

Sites upgraded from 2.1.9 or earlier get the permission on every role that had Administer site configuration. See Upgrading.

Uninstall

drush pmu scss

Uninstalling removes the scss.settings configuration and every state entry the module wrote (the last-compile time of each directory and the time of the last watch check). Compiled CSS files are left in place, because the theme uses them.