Fixing Sass Deprecation Warnings in Jekyll with Minima
If you’re running a Jekyll site with the Minima theme and a recent version of Ruby, you’ve likely seen a wall of deprecation warnings like this when building:
DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be
removed in Dart Sass 3.0.0.
╷
1 │ @import "minima";
│ ^^^^^^^^
╵
assets/main.scss 1:9 root stylesheet
Here’s what’s happening and how to silence it.
The Cause
Dart Sass (the modern Sass compiler) is phasing out the @import rule in favour of @use and @forward. As of Dart Sass 1.75+, using @import emits deprecation warnings, and in Dart Sass 3.0.0 it will be removed entirely.
Minima 2.5.x still uses @import throughout its SCSS. Since the warnings come from the gem rather than your own code, there’s nothing to fix in your project directly –it’s an upstream issue in Minima.
The Fix
Jekyll’s Sass converter passes configuration through to Dart Sass. Two options cover the warnings:
quiet_deps–silences deprecation warnings that originate inside imported dependenciessilence_deprecations–silences specific named deprecations, including those in the root stylesheet
Add both to _config.yml:
sass:
quiet_deps: true
silence_deprecations: ['import', 'global-builtin', 'color-functions']
After saving, restart jekyll serve (config changes always require a restart). The build output will be clean.
Why Both Options Are Needed
quiet_deps covers warnings from files that Minima imports internally (e.g. minima/base, minima/layout). But the warning on line 1 of assets/main.scss –the @import "minima" call itself –is in the root stylesheet, which quiet_deps doesn’t cover. silence_deprecations handles that remaining case.
The three deprecation identifiers map to:
| Identifier | Warning |
|---|---|
import |
@import rule usage |
global-builtin |
Global functions like lighten() |
color-functions |
Deprecated colour function signatures |
When This Will Break
These settings suppress warnings, not the underlying behaviour. When Dart Sass 3.0.0 ships and removes @import support entirely, the site will fail to build. At that point the fix is to upgrade Minima to a version that uses @use –which the Minima maintainers will need to release. Until then, the suppression config is the right approach.