Migrate dart-sass to modern Sass #510
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Migrate to Dart Sass and Modern Build System (v3.0.0)
Summary
This PR modernizes the Solid CSS framework by migrating from the deprecated node-sass to dart-sass, implementing the modern Sass module system, and replacing Grunt with npm scripts. This ensures compatibility with Node.js 22+ and eliminates all deprecation warnings.
🔴 Breaking Changes
@use/@forwardinstead of@import@usesyntax✨ What Changed
Dependencies
sass@1.97.0(dart-sass),lightningcss-cli@1.28.1node-sass,grunt,grunt-sass,grunt-dart-sass, all grunt pluginsSass Modernization
@import→@use/@forwardmodule systemsass:color,sass:map,sass:mathdarken()/lighten()→color.adjust($color, $lightness: ±X%)map-get()/map-has-key()→map.get()/map.has-key()/division →math.div()percentage()→math.percentage()Build System
Before: Grunt + 7 plugins + legacy Sass API
After: npm scripts + Sass CLI + LightningCSS
New Scripts:
Package Configuration
📊 Results
✅ Testing
📝 Migration Guide for Consumers
If you're using the pre-built CSS (most users):
No changes needed! Just update the package version.
If you're importing Sass files:
Before:
After:
If you're overriding variables:
Before:
After: