SASS or plain CSS An example of use in Drupal with Dart Sass and Gulp 4
summary
Shows how to use Dart‑Sass together with Gulp 4 and Node/NPM to generate CSS for a Drupal theme. Covers what CSS preprocessors are, pros/cons versus plain CSS, required tools (NVM, package.json, Dart‑Sass, autoprefixer, Gulp tasks like compile, clean, sourcemaps), a practical Drupal theme example demonstrating partials, variables, nesting, functions, mixins, placeholders, interpolation, maps and CSS custom properties, plus Dart‑Sass features (module system, @use/@forward, differences from node‑sass, built‑in sass:* modules) and notes on migrating from node‑sass.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:09Talk origin
- 3:15Preprocessors vs pure CSS
- 7:13Preprocessors overview
- 10:07Pros and cons
- 17:40Drupal setup example
- 22:41Gulp 4 setup
- 28:49Gulp tasks
- 33:09Dart Sass vs JS Sass
- 34:33SASS syntax
- 35:40Project structure
- 38:12Custom properties
- 40:42Dart Sass @use
- 43:55SASS maps
- 46:46Dynamic CSS mixins
- 47:07Migration tools
- 48:13Q&A
