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

Old Command New Command
npx gulp npm run build
npx gulp sass npm run sass
npx gulp sass:lint npm run lint

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)

Issue fork paragraphs-3562226

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pivica created an issue. See original summary.

pivica’s picture

Issue summary: View changes

pivica’s picture

Status: Active » Needs review

MR ready, tested locally visually and checked css change in details, looks good to me.

pivica’s picture

  • berdir committed 0ba760ca on 8.x-1.x authored by pivica
    feat: #3562226 Modernize CSS build system: Replace Gulp with npm scripts...
berdir’s picture

Status: Needs review » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.