Refactor: How to fix deprecated Sass color functions (lighten/darken)?

Documentation for Sessions

♻️ Refactor: How to fix deprecated Sass color functions (lighten/darken)?

📋 Decision Context

Question:

How to fix deprecated Sass color functions (lighten/darken)?

Task: Fix deprecated SCSS functions in gograb-space app


🎯 Decision Made

Chosen:

Use color.adjust() with modern Sass @use syntax

Options Considered:

  1. Keep deprecated functions
  2. Use color.scale()
  3. Use color.adjust()
  4. Use CSS variables only

💭 Reasoning

Deprecated Sass functions lighten() and darken() will be removed in Dart Sass 3.0.0. Using color.adjust() is the official replacement and follows modern Sass best practices with @use "sass:color" module syntax. Fixed 6 instances across 3 files: deployment-modal.component.scss (3), _ai-dashboard-tokens.scss (2), and ux-buttons.scss (1). For CSS variables where color.adjust() cannot work at runtime, used pre-computed fallback values.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation