Modernize CSS build system: Replace Gulp with npm scripts, update to Dart Sass 3.0 and Drupal 11 stylelint standards

Created on 9 December 2025, about 2 months ago

Problem/Motivation

The current CSS build system in the css/ folder uses outdated tooling from ~2017:

  • Gulp 4.x with gulp-sass 3.x (uses deprecated node-sass)
  • Outdated dependencies (stylelint 8.x, autoprefixer 7.x)
  • Browser targets include IE 10+ and Safari 7+
  • Uses deprecated Sass @import syntax (will be removed in Dart Sass 3.0)
  • Uses deprecated map-get() global function

Proposed resolution

Modernize the build system to align with Drupal 11 standards:

Build system changes:

  • Replace Gulp with direct npm scripts (npm run build, npm run sass, npm run lint)
  • Update to modern dependencies (sass 1.82+, stylelint 16.x, autoprefixer 10.x, postcss-cli 11.x)
  • Remove Gulp files: gulpfile.js, gulp-tasks.js, gulp-options.yml
  • Add postcss.config.js and .browserslistrc for modern browser targets

Sass modernization (Dart Sass 3.0 compatibility):

  • Migrate @import@use/@forward
  • Migrate map-get()map.get() with @use "sass:map"

Code cleanup:

  • Remove -ms-grid-* vendor prefixes (IE no longer supported)
  • Update .stylelintrc.yml to match Drupal 11 core configuration
  • Add unit-allowed-list rule matching Drupal core

Browser support:

  • Target: last 2 versions, not dead
  • Drops IE 10/11, Safari 7 support

New commands

Benefits

  • Fewer config files (3 removed, 2 small added)
  • Faster compilation (Dart Sass vs deprecated node-sass)
  • Actively maintained dependencies
  • No deprecation warnings
  • Aligned with Drupal 11 CSS coding standards
  • Smaller CSS output (no IE vendor prefixes)

Remaining tasks

  • Review patch
  • Test CSS output matches expected styling
  • Commit
📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇷🇸Serbia pivica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024