Skip to content
CAI
Software that uses CAICheck a score

sass/dart-sass

64.6

Adequate · 23 September 2026

65k

lines of production code

Dart

with TypeScript

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is Dart Sass, a high-performance compiler that transforms Sass stylesheets into CSS. It provides a comprehensive API for both Dart and JavaScript environments, supporting synchronous and asynchronous compilation, custom importers, and user-defined functions. The system includes a command-line interface for file watching and REPL interaction, alongside an embedded protocol for external tool integration. It also exposes a PostCSS-compatible parser and advanced tooling APIs for inspecting and transforming Sass syntax.

How it got here

2016 — Dart 3 migration and AST restructuring

23 changes.

This period focused on migrating the Dart Sass codebase to Dart 3 syntax and null-safety, introducing sealed classes and immutable data structures throughout the compiler. The internal architecture was significantly reorganized, including a modular visitor pattern, a split CSS and Sass AST, and a dedicated CLI executable. These changes established a robust, modern foundation for the compiler's core logic and public API.

2017–2019 — Core architecture and CLI refactoring

13 changes.

This period focused on restructuring the Sass engine's core infrastructure, introducing asynchronous import resolution, a modular module system with advanced forwarding capabilities, and mutable CSS AST nodes for evaluation. The command-line interface was significantly refactored into modular components to support concurrent compilation, while built-in functions were organized into dedicated modules to replace legacy global definitions. Comprehensive test coverage was added for the new Dart API, CLI executables, and core value types to ensure stability across these architectural changes.

2021–2024 — JS API and embedded compiler expansion

15 changes.

This period focused on expanding Dart Sass's external interfaces by introducing a comprehensive JavaScript API and an embedded compiler protocol for programmatic control. It also significantly enhanced internal capabilities, including modern color space support with gamut mapping and a refactored number type system, while isolating legacy Node Sass logic.

Features

Add CSS Color Level 4 color space implementations

The library now implements the color spaces defined in the CSS Color Level 4 specification, including sRGB, sRGB-linear, display-p3, display-p3-linear, a98-rgb, prophoto-rgb, rec2020, XYZ (D50 and D65), Lab, LCH, OKLab, OKLCH, HSL, HWB, and the legacy RGB space. These additions enable users to define and convert colors using these modern, standardized color models, with specific support for wide-gamut spaces like display-p3 and perceptually uniform spaces like OKLab and OKLCH.

lib/src/value/color/space · high confidence

Add Dart wrappers for JS API importers

New files in lib/src/importer/js\_to\_dart introduce Dart classes (JSToDartImporter, JSToDartAsyncImporter, JSToDartFileImporter) that wrap JavaScript-based importers, exposing them as synchronous or asynchronous Dart Importers. This enables JS-defined canonicalize and load functions to be used within the Dart importer pipeline, with proper handling of JS promises, URL conversion, and error wrapping.

_lib/src/importer/js\_to\dart · high confidence

Add JS-compatible visitor wrappers for Sass AST nodes

New wrapper classes have been added in the \lib/src/js/visitor\ directory to bridge the Dart Sass AST with JavaScript. These include \JSExpressionVisitor\, \JSIfConditionExpressionVisitor\, \JSSimpleSelectorVisitor\, and \JSStatementVisitor\, which implement the corresponding internal visitor interfaces and delegate calls to underlying JS objects. This enables JavaScript consumers to traverse and process Sass AST nodes (such as expressions, conditions, selectors, and statements) via the JS API.

lib/src/js/visitor · high confidence

Added clip and local-minde gamut mapping strategies

Users can now choose between two specific gamut mapping strategies when converting colors outside the display gamut: 'clip', which simply clamps individual color channels to their valid range, and 'local-minde', which uses the deltaEOK difference formula to iteratively reduce chroma while preserving perceptual color differences. These implementations follow the CSS Color Level 4 specification, providing more accurate and perceptually uniform color handling for out-of-gamut conversions.

_lib/src/value/color/gamut\_map\method · high confidence

Built-in functions are organized into dedicated modules

The standard Sass functions (color, list, map, math, meta, selector, string) are now defined in dedicated files within \lib/src/functions\, each exporting a \BuiltInModule\ alongside global function definitions. This structure introduces new module-specific functions such as \map.deep-merge\, \map.deep-remove\, \map.set\, \string.split\, and \math\ constants (\e\, \pi\), while deprecating many legacy global functions in favor of their module-prefixed equivalents (e.g., \sass:color\, \sass:math\).

lib/src/functions · high confidence

Complete AST statement model for Sass and CSS rules

The \lib/src/ast/sass/statement\ directory now contains the full set of AST node classes representing every Sass and CSS statement type, including control flow (\@if\, \@for\, \@while\, \@each\), module loading (\@use\, \@forward\), mixins and functions (\@mixin\, \@function\, \@content\), and standard CSS rules (\@media\, \@supports\, \@import\, \@extend\, \@debug\, \@warn\, \@error\, \@return\). This reorganization establishes a comprehensive, visitor-ready statement hierarchy that covers the entire scope of supported syntax.

lib/src/ast/sass/statement · high confidence

Initial build and release automation infrastructure

The tool directory now includes the core \grind.dart\ script and utility libraries that automate the building, testing, and publishing of Dart Sass. This setup configures \cli\_pkg\ to generate standalone executables, NPM packages, Chocolatey packages, and Homebrew formulas, while also managing JavaScript dependencies like \@parcel/watcher\ and \chokidar\ for file watching. It establishes the workflow for compiling the Sass compiler to JavaScript, handling ESM exports, and integrating with the embedded protocol specification.

tool · high confidence

Initial project scaffolding and configuration

The repository is initialized with essential configuration files, including \.pubignore\ and \.gitignore\ to manage build artifacts and dependencies, \analysis\_options.yaml\ for Dart static analysis, and \dartdoc\_options.yaml\ to structure API documentation. It also introduces \buf.gen.yaml\ and \buf.work.yaml\ to configure Protocol Buffer generation for the embedded compiler, \dart\_test.yaml\ to tag Node.js-specific tests, and \CODE\_OF\_CONDUCT.md\ to establish community guidelines. Documentation files such as \differences.md\ (comparing Dart Sass to Ruby Sass), \perf.md\ (benchmarking results), and \CONTRIBUTING.md\ are added to guide developers.

(repo-wide) · high confidence

Introduce PostCSS-compatible Sass parser with expression-level API

The \sass-parser\ package is now available as a PostCSS-compatible parser for CSS and Sass, providing first-class support for Sass-specific syntax including \@use\, \@import\, \@include\, \@function\, \@mixin\, \@if\, \@for\, \@each\, \@while\, \@extend\, \@media\, \@supports\, \@at-root\, \@content\, \@forward\, \@error\, \@warn\, \@debug\, and \@return\ rules. It exposes a detailed expression-level AST for parsing declaration values, selectors, and Sass expressions (such as lists, maps, function calls, and variables), allowing tools to inspect and modify these structures programmatically while maintaining compatibility with the standard PostCSS API.

pkg/sass-parser · high confidence

Introduce a dedicated CSS Abstract Syntax Tree (AST)

Sass now generates a distinct CSS AST to represent the output of plain CSS files, separate from the Sass AST. This new AST is constructed by the evaluator during traversal rather than by a dedicated parser, allowing it to handle Sass-specific transformations like \@extend\ and at-rule hoisting. The implementation uses a split mutable/immutable architecture: the evaluator works with mutable nodes to perform these modifications, while the rest of the system interacts with immutable interfaces to prevent unintended side effects. The AST includes specific node types for media queries, \@supports\ rules, \@keyframes\, custom properties, and unknown at-rules, ensuring that the final compiled CSS accurately reflects these features.

lib/src/ast/css · high confidence

Introduce new public Dart API for Sass compilation

The library now exposes a new public Dart API entry point in \lib/sass.dart\, providing top-level functions like \compileToResult\ to compile Sass files or strings to CSS. This API allows users to configure compilation via parameters such as \importers\, \loadPaths\, \functions\, \style\, \sourceMap\, and \charset\, while also exposing key types like \SassException\, \Logger\, \OutputStyle\, and \Callable\ for customizing behavior and handling errors.

lib · high confidence

Introduce sass\_api package for advanced Sass tooling

The new \sass\_api\ package exposes internal Dart Sass APIs—including the full Sass AST, selector parsing, import resolution logic, and visitor patterns—allowing developers to build advanced tooling that inspects or transforms Sass code. This release also adds specific API capabilities such as \Expression.isPlainCss()\, the \SassColor.displayP3Linear\ constructor, and the ability to parse selectors via \ImportCache\.

_pkg/sass\api · high confidence

Introduce standalone Sass CLI executable

Adds a new \bin/sass.dart\ entry point that provides a command-line interface for compiling Sass stylesheets. This executable supports interactive REPL mode, file watching, and parallel compilation via Dart isolates. It handles version reporting, colored error output, and deprecation flags, serving as the primary user-facing tool for Sass compilation outside of library usage.

bin · high confidence

Introduce the embedded Sass compiler protocol implementation

This change adds the \lib/src/embedded\ directory, which implements the Dart Sass embedded compiler. This allows the Sass CLI to run in a special mode where it communicates with a host process via stdin/stdout using a protocol buffer-based protocol. The implementation includes an \IsolateDispatcher\ to manage concurrent compilations across multiple isolates, a \CompilationDispatcher\ to handle individual compilation requests, and utilities for serializing/deserializing Sass values and errors. This enables external tools to drive the Sass compiler programmatically with support for features like custom functions, importers, and deprecation handling.

lib/src/embedded · high confidence

Introduces platform-specific IO abstraction layer

The library now uses a dedicated IO shim in \lib/src/io\ to abstract file system and process operations, allowing the Sass compiler to run on both the Dart VM and JavaScript platforms (Node.js and browsers). This change introduces \interface.dart\ as the shared contract, \vm.dart\ for native Dart IO, and \js.dart\ for Node.js-specific IO using \node\_interop\ and \chokidar\/\@parcel/watcher\. Users benefit from consistent IO behavior across environments, including support for reading from stdin, watching directories, and handling UTF-8 errors, while ensuring that JS-specific features like file watching and stdin reading are gracefully handled or unsupported in browser contexts.

lib/src/io · high confidence

New Grinder tasks for benchmarking, version bumping, and release verification

The \tool/grind\ directory has been expanded with several new automation tasks. The \benchmark\ task now generates and runs performance tests against real-world Sass frameworks, replacing the previous Ruby Sass target with Carbon (IBM Cloud Cognitive) and Bootstrap. A new \bump-version\ task automates incrementing package versions across \pubspec.yaml\ and \package.json\ files while updating changelogs. Additionally, a \double-check\ task verifies that the repository is in a valid state for release by checking tag consistency, changelog entries, and ensuring the version hasn't already been published to pub.

tool/grind · high confidence

New JavaScript API classes for Sass value types

The JavaScript API now exposes dedicated classes for core Sass value types, including \SassArgumentList\, \SassBoolean\, \SassCalculation\ (with static methods for \calc\, \min\, \max\, and \clamp\), \SassColor\ (supporting multiple color spaces like \display-p3-linear\ and \oklch\), \SassFunction\, \SassList\, \SassMap\, \SassMixin\, \SassModule\, \SassNumber\, and \SassString\. These classes allow JavaScript users to construct, inspect, and manipulate Sass values directly, with specific behaviors such as preventing direct instantiation of \SassBoolean\ and \SassMixin\ in favor of predefined constants or internal references, and providing detailed control over color gamut mapping and number unit coercion.

lib/src/js/value · high confidence

New JavaScript API implementation for Dart Sass

This release introduces the official Dart Sass JavaScript API, providing a modern, spec-compliant interface for compiling Sass in JavaScript environments. The new API exposes synchronous and asynchronous compilation methods (\compile\, \compileString\, \compileAsync\, \compileStringAsync\) along with a \Compiler\ class for efficient repeated compilations. It also includes a \sass-parser\ package that exposes a PostCSS-compatible API for parsing Sass syntax into an AST, allowing JavaScript tools to inspect and transform Sass code. The legacy \node-sass\-compatible \render\ and \renderSync\ functions are retained in a \legacy\ directory for backward compatibility but are no longer actively updated. The implementation uses Dart's JS interop to bridge Dart's Sass engine with JavaScript, supporting custom importers, functions, and deprecation handling.

lib/src/js · high confidence

New Sass expression AST nodes for modern syntax and data types

The \lib/src/ast/sass/expression\ directory now includes dedicated AST node classes for core Sass expression types, including \BinaryOperationExpression\ and \UnaryOperationExpression\ for arithmetic and logical operators, \ListExpression\ and \MapExpression\ for Sass collections, and literals for \BooleanExpression\, \ColorExpression\, \NumberExpression\, \NullExpression\, and \StringExpression\. It also introduces \FunctionExpression\ and \InterpolatedFunctionExpression\ for function calls, \VariableExpression\ for variable references, \ParenthesizedExpression\ for grouping, \SelectorExpression\ for the \&\ parent selector, \ValueExpression\ for embedding values, and conditional structures like \IfExpression\ (for the modern \if()\ syntax) and \LegacyIfExpression\ (for the old ternary form). Additionally, \SupportsExpression\ is added to handle \@supports\ conditions in \@import\ modifiers.

lib/src/ast/sass/expression · high confidence

New importer infrastructure with async support and Node package resolution

The importer subsystem has been restructured to support asynchronous import resolution via a new \AsyncImporter\ base class, allowing importers to perform non-blocking I/O. A new \CanonicalizeContext\ class manages the import resolution state, exposing the \containingUrl\ and \fromImport\ status to importers during canonicalization. The \FilesystemImporter\ has been updated to use the new \new\ constructor syntax and includes deprecation warnings for implicit current working directory load paths. Additionally, a new \NodePackageImporter\ has been added to resolve \pkg:\ URLs using the Node.js resolution algorithm, including support for \package.json\ exports and subpath imports. The \ImporterResult\ class now requires an explicit \syntax\ parameter, deprecating the older \indented\ boolean. A \NoOpImporter\ is also provided for stylesheets that do not support relative imports.

lib/src/importer · high confidence

New utility classes for reference boxes, fuzzy number equality, and cross-platform identity checks

The \lib/src/util\ directory now includes several new helper classes and extensions to support internal logic. \Box\ and \ModifiableBox\ provide a mechanism for creating unmodifiable references to mutable values, useful for tracking state changes. \FuzzyEquality\ implements equality and hashing for \double\ values based on Sass's fuzzy number rules, ensuring consistent behavior in collections. \crossPlatformIdentical\ offers a consistent identity check for \-0\ and \NaN\ across Dart VM and JavaScript platforms. Additionally, new map views (\LimitedMapView\, \MergedMapView\, \PrefixedMapView\, \PublicMemberMapView\, \UnprefixedMapView\) provide specialized ways to view and filter map data, while \MultiSpan\ and \LazyFileSpan\ enhance source span handling for error reporting and performance.

lib/src/util · high confidence

Support for generalized @supports conditions in the AST

The parser now supports the full range of CSS @supports conditions, including declaration checks (e.g., \display: flex\), function syntax (e.g., \grid()\), negation (\not ...\), and logical operations (\and\, \or\). This enables Sass to correctly parse and serialize complex feature queries that were previously unsupported or only partially handled.

_lib/src/ast/sass/supports\condition · high confidence

Architecture

Cordon Node Sass import logic into a legacy directory

The Node Sass compatibility importer has been moved into a dedicated \lib/src/importer/legacy\_node\ directory, separating its implementation and interface files from the main importer logic. This change isolates the legacy Node.js-specific import behavior—which handles distinct resolution rules like working directory precedence and custom importer invocation—making the core Sass importer codebase cleaner and easier to maintain.

_lib/src/importer/legacy\node · high confidence

Reorganized Sass compiler into a modular visitor architecture

The internal implementation of the Sass compiler has been restructured to use a dedicated visitor pattern for AST traversal. The \lib/src/visitor\ directory now contains specialized visitors for core compiler tasks, including the synchronous and asynchronous evaluators (\evaluate.dart\, \async\_evaluate.dart\), the CSS serializer (\serialize.dart\), and various utility visitors for searching, cloning, and analyzing the AST (such as \ast\_search.dart\, \recursive\_ast.dart\, and \find\_dependencies.dart\). This change separates the business logic of evaluation and serialization from the traversal mechanics, providing a cleaner, more maintainable foundation for the compiler's internal operations.

lib/src/visitor · high confidence

Sass parser is split into modular, single-responsibility classes

The monolithic stylesheet parser has been refactored into a set of specialized, single-responsibility classes to improve maintainability and clarity. The new structure includes \StylesheetParser\ as the base for statement-level parsing, \CssParser\ for plain CSS-specific rules (such as \@import\ and \@function\), \ScssParser\ and \SassParser\ for syntax-specific handling, and dedicated parsers for complex constructs like \SelectorParser\, \MediaQueryParser\, \KeyframeSelectorParser\, and \AtRootQueryParser\. This modularization allows each component to focus on its specific grammar rules while sharing common infrastructure from the base \Parser\ class.

lib/src/parse · high confidence

Behavioural changes

Dart Sass implementation migrated to Dart 3 syntax and null-safety

The Sass compiler's internal implementation in \lib/src\ has been updated to use Dart 3 language features, including the adoption of \new\ constructors, \final class\ declarations, and \abstract interface class\ definitions. This change also enforces strict null-safety across the codebase, ensuring that variables and parameters are explicitly handled for nullability, which improves runtime reliability and code clarity for the compiler's core logic.

lib/src · high confidence

Expanded color space support and gamut mapping in Sass color functions

The color handling library now supports a wider range of modern color spaces, including the addition of \display-p3-linear\ alongside existing spaces like \oklab\, \oklch\, \rec2020\, and \a98-rgb\. To handle colors that fall outside the target gamut during conversions, a new \GamutMapMethod\ abstraction has been introduced, offering \clip\ and \local-minde\ algorithms to control how out-of-gamut colors are mapped. Additionally, the interpolation logic has been refined to better manage missing channels and hue adjustments, ensuring more accurate color transitions and conversions across these expanded color models.

lib/src/value/color · high confidence

Introduce DynamicImport and StaticImport AST nodes

The Sass AST now distinguishes between dynamic and static imports via new \DynamicImport\ and \StaticImport\ classes. \DynamicImport\ represents runtime-loaded files, storing the URL as a string to preserve leading \./\ characters for Node Sass compatibility, while \StaticImport\ represents plain CSS \@import\ rules and supports optional modifiers like media or supports queries.

lib/src/ast/sass/import · high confidence

Introduce mutable CSS AST nodes for the evaluation step

The CSS parser now provides a parallel set of mutable AST node classes (e.g., ModifiableCssStyleRule, ModifiableCssAtRule) in the modifiable package, used specifically during the evaluation phase. This allows the engine to modify the CSS structure—such as updating selectors or removing nodes—while keeping the original immutable AST intact for other uses.

lib/src/ast/css/modifiable · high confidence

Introduce new Sass AST node types for selectors and conditions

The Sass AST now includes dedicated classes for handling selectors before interpolation is resolved (such as InterpolatedClassSelector, InterpolatedIDSelector, and InterpolatedPseudoSelector) and for defining @supports conditions (SupportsCondition). This allows the parser to capture selector structure and support-rule logic earlier in the compilation pipeline, enabling more accurate source mapping and validation before values are fully evaluated.

lib/src/ast/sass · high confidence

New embedded importer architecture with host communication

The embedded Sass importer system has been restructured to support communication with the host process. A new \ImporterBase\ abstract class provides shared utilities like URL validation, while \HostImporter\ and \FileImporter\ now delegate import resolution and canonicalization to the host via protocol buffer messages. This change enables the host to control how imports are resolved, particularly for non-file schemes, and exposes the containing URL context to importers during canonicalization.

lib/src/embedded/importer · high confidence

Refactor SassScript value types to use Dart 3 syntax and sealed classes

The \lib/src/value\ directory has been rewritten to use Dart 3 language features, including \final class\ declarations, primary constructors, and \@sealed\ annotations for all SassScript value types (such as \SassColor\, \SassNumber\, \SassString\, \SassList\, \SassMap\, \SassBoolean\, \SassNull\, \SassCalculation\, \SassFunction\, \SassMixin\, and \SassModule\). This change enforces immutability and restricts external extension or implementation of these value classes, while also introducing new capabilities like \SassModule\ for module reflection and \SassArgumentList\ for handling rest arguments with keyword maps.

lib/src/value · high confidence

Refactored @extend logic into a modular, Dart 3-compatible architecture

The internal implementation of the @extend rule has been restructured into a dedicated, modular package within lib/src/extend. This change introduces a new \ExtensionStore\ to manage selector tracking and extension application, alongside dedicated classes for \Extension\ and \Extender\ states, and a \MergedExtension\ class to handle mandatory extension merging. The logic is now supported by a suite of utility functions in \functions.dart\ for selector unification and a new \ExtendMode\ enum to distinguish between normal, replace, and all-targets extension behaviors. This refactoring also migrates the codebase to Dart 3 syntax (e.g., \final class\, \new()\ constructors) and improves the handling of selector specificity, media contexts, and pseudo-selector ordering.

lib/src/extend · high confidence

Refactored CLI executable into modular components with concurrent compilation support

The Sass command-line interface has been restructured to improve maintainability and performance. The previous monolithic executable logic has been split into dedicated modules: \options.dart\ now handles all CLI argument parsing, \compile\_stylesheet.dart\ manages single-file compilation, and \watch.dart\ oversees file watching and incremental updates. A new \concurrent\ module enables parallel compilation of multiple stylesheets using Dart isolates on the VM (with a fallback for JS environments), significantly speeding up builds with many files. Additionally, the interactive REPL (\repl.dart\) has been extracted to support \@use\ directives and improved error highlighting.

lib/src/executable · high confidence

Refactored callable architecture with new async support and strict typing

The callable system has been restructured to support asynchronous execution and stricter type safety. A new \AsyncCallable\ interface and \AsyncBuiltInCallable\ implementation allow Sass functions and mixins to perform asynchronous work, enabling compatibility with async compilation methods. The synchronous \BuiltInCallable\ now supports multiple overloads, allowing a single function name to handle different argument signatures. Additionally, the codebase has been updated to use Dart 3 features such as \final class\, \new\ constructors, and \@sealed\ interfaces, while \PlainCssCallable\ and \UserDefinedCallable\ have been refined to better distinguish between plain CSS outputs and user-defined Sass callbacks.

lib/src/callable · high confidence

Refactored logging infrastructure with new logger implementations

The logging system has been restructured into distinct, specialized components: \DefaultLogger\ now automatically handles color support based on the environment, \StderrLogger\ manages the actual output formatting, and \DeprecationProcessingLogger\ centralizes logic for silencing, making fatal, limiting repetition, and summarizing deprecation warnings. A new \TrackingLogger\ wraps other loggers to monitor whether warnings or debug messages have been emitted, and \JSToDartLogger\ provides a bridge for JavaScript environments. This change improves modularity and gives users more granular control over how deprecation warnings are displayed and handled.

lib/src/logger · high confidence

Refactored module system with new built-in, forwarded, and shadowed views

The module implementation in lib/src/module has been rewritten to support advanced import and configuration features. A new BuiltInModule class provides Sass's built-in functions, mixins, and variables under the sass: URL space. ForwardedModuleView and ShadowedModuleView replace previous logic to handle @forward rules, allowing precise control over member visibility through prefixes, safelists, and blocklists (replacing older whitelist/blacklist terminology). This refactoring enables better handling of name conflicts, variable shadowing, and configuration propagation across forwarded stylesheets.

lib/src/module · high confidence

Restructured AST module with new selector and node abstractions

The AST module has been reorganized into distinct entry points for CSS and Sass constructs, introducing a sealed \AstNode\ base class with lazy span generation and a new \Selector\ base class that enforces structural equality and visitor-based analysis. This change exposes detailed selector APIs (including parent, placeholder, and pseudo-selectors) and consolidates statement/expression definitions, providing a more robust foundation for selector validation and serialization.

lib/src/ast · high confidence

Sass numbers are split into specialized subclasses based on units

The internal representation of Sass numbers has been refactored to use distinct subclasses—UnitlessSassNumber, SingleUnitSassNumber, and ComplexSassNumber—instead of a single monolithic class. This change improves type safety and performance by handling unitless values, single-unit values (with known compatibility sets like px, em, or deg), and complex multi-unit values (such as ratios) separately, ensuring that unit coercion and compatibility checks are more precise and efficient.

lib/src/value/number · high confidence

Selector AST restructured into immutable, Dart 3-style classes

The selector AST in \lib/src/ast/selector\ has been rewritten to use Dart 3 \final class\ and \enum\ definitions with primary constructors, replacing the previous mutable or legacy-style implementations. This change introduces structural equality (via \==\ and \hashCode\) for all selector types (e.g., \ClassSelector\, \IDSelector\, \PseudoSelector\), ensuring that selectors are fully immutable and can be reliably compared and cached. It also standardizes the handling of specific constructs like attribute modifiers, pseudo-element vs. pseudo-class distinction, and parent selector resolution within this new immutable framework.

lib/src/ast/selector · high confidence

Visitor interfaces migrated to Dart 3 abstract interface classes

The visitor interfaces in \lib/src/visitor/interface\ (including \CssVisitor\, \ExpressionVisitor\, \StatementVisitor\, \SelectorVisitor\, and others) have been converted to use Dart 3's \abstract interface class\ syntax. This change modernizes the codebase to leverage Dart 3's interface capabilities, allowing these interfaces to be implemented directly without requiring a separate \implements\ clause in the traditional sense, while maintaining the same visitor pattern structure for traversing CSS, SassScript expressions, statements, selectors, and values.

lib/src/visitor/interface · high confidence

Test coverage

Add CLI test suites for Dart and Node.js executables; Add Node.js CLI test suites; Added browser and comprehensive regression tests for Sass; Added comprehensive tests for the embedded Sass protocol; Added shared CLI test suites for compilation, errors, REPL, and watch modes; Added tests for string utility functions; Added tests for the Dart API; Added unit tests for Dart API value types; Split Dart CLI tests into dedicated suites.

Dependencies

Dart Sass 1.105.0 release with updated dependencies and new analysis package

This release updates the main Dart Sass package to version 1.105.0, raising the minimum Dart SDK requirement to 3.13.0 and upgrading the \sass\_api\ package to 17.11.0. The dependency graph has been refreshed, including bumps to \analyzer\ (^14.0.0), \protobuf\ (\>=4.0.0 \<7.0.0), and \lints\ (\>=4.0.0 \<7.0.0). A new \analysis\ package has been added to provide shared analysis options using \lints\ ^6.0.0. On the JavaScript side, the \sass\ npm package now requires Node.js \>=20.19.0 and depends on \chokidar\ ^5.0.0 and \immutable\ ^5.1.5. The \sass-parser\ package has been updated to version 0.4.56, and a new \@sass/types\ package has been introduced to provide standalone TypeScript declarations for the Sass JS API.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 65 (+2.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 91 → 85 (-5.8)
  • Architecture 56 → 58 (+2.1)
  • Maturity 60 → 61 (+0.8)
  • Readiness 58 → 68 (+10.3)
  • Security 94 → 90 (-4.0)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (14)

  • Change coupling clique: index.ts, convert.ts, from-props.ts (pkg/sass-parser/lib/index.ts)
  • Change coupling: async_file.dart ↔ file.dart (lib/src/importer/js_to_dart/async_file.dart)
  • Change coupling: file.dart ↔ host.dart (lib/src/embedded/importer/file.dart)
  • Change coupling: file.dart ↔ sync.dart (lib/src/importer/js_to_dart/file.dart)
  • Change coupling: forwarded_view.dart ↔ shadowed_view.dart (lib/src/module/forwarded_view.dart)
  • Change coupling: host_callable.dart ↔ host.dart (lib/src/embedded/host_callable.dart)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • The importer doc is a thin 25-word entry with no explanation of the @use/@forward/@import resolver API contract. (pkg/sass_api/doc/importer.md)
  • complexity unreadable for .dart — churn × complexity hotspots could not be measured

New (281)

  • AsyncEnvironment._fromOneModule (cognitive 29) (lib/src/async_environment.dart)
  • AsyncEnvironment.importForwards (cognitive 36) (lib/src/async_environment.dart)
  • AsyncEnvironment.importForwards (cyclomatic 20) (lib/src/async_environment.dart)
  • AsyncEnvironment.setVariable (cognitive 26) (lib/src/async_environment.dart)
  • AsyncEnvironment.setVariable (cyclomatic 16) (lib/src/async_environment.dart)
  • AsyncImportCache.canonicalize (cognitive 30) (lib/src/async_import_cache.dart)
  • AsyncImportCache.canonicalize (cyclomatic 21) (lib/src/async_import_cache.dart)
  • ClassTooLong: AsyncEnvironment (lib/src/async_environment.dart)
  • ClassTooLong: ExtensionStore (lib/src/extend/extension_store.dart)
  • ClassTooLong: Parser (lib/src/parse/parser.dart)
  • ClassTooLong: SassCalculation (lib/src/value/calculation.dart)
  • ClassTooLong: SassColor (lib/src/value/color.dart)
  • ClassTooLong: _SerializeVisitor (lib/src/visitor/serialize.dart)
  • ColorSpace.convertLinear (cognitive 20) (lib/src/value/color/space.dart)
  • ColorSpace.convertLinear (cyclomatic 23) (lib/src/value/color/space.dart)
  • CompilationDispatcher._compile (cognitive 35) (lib/src/embedded/compilation_dispatcher.dart)
  • CompilationDispatcher._compile (cyclomatic 17) (lib/src/embedded/compilation_dispatcher.dart)
  • Coverage not measured — JavaScript/TypeScript suite
  • CssComment.constructor (cognitive 20) (pkg/sass-parser/lib/src/statement/css-comment.ts)
  • CssMediaQuery.merge (cognitive 41) (lib/src/ast/css/media_query.dart)
  • …and 261 more

Changes since last survey

  • 47 commits — 41 feature/other, 6 fixes

By area

  • lib/src — 17 commits
  • .github/workflows — 12 commits
  • (repo) — 6 commits
  • (root) — 4 commits
  • .github/util — 4 commits
  • pkg/sass-parser — 4 commits

Notable commits

  • fix: Apply latest lint fixes
  • fix: Fix --watch not recompiling sources modified during a compilation (#2850)
  • fix: Fix dartdoc error
  • fix: Merge pull request #2834 from ntkme/fix-release
  • fix: Merge pull request #2859 from sass/fix-auto-merge
  • fix: Revert "Bump dart-lang/setup-dart in /.github/util/initialize"
  • change: Add explicit versions to .github/util actions
  • change: Auto-merge dependabot PRs as the Sass bot account (#2866)
  • change: Automatically merge dependabot PRs (#2843)
  • change: Avoid duplicating loud comments that appear before @use (#2854)
  • change: Bump actions/attest from 4.2.0 to 4.2.2 (#2830)
  • change: Bump browser-actions/setup-chrome from 2.1.2 to 2.2.0 (#2841)
  • change: Bump bufbuild/buf-action from 1.4.0 to 1.5.0 in /.github/util/initialize (#2826)
  • change: Bump dart-lang/setup-dart from 1.7.2 to 1.8.0 (#2829)
  • change: Bump dart-lang/setup-dart from 1.8.0 to 1.8.1
  • change: Bump dart-lang/setup-dart in /.github/util/initialize
  • change: Bump postcss from 8.5.23 to 8.5.25 in /pkg/sass-parser (#2832)
  • change: Bump postcss from 8.5.25 to 8.5.26 in /pkg/sass-parser (#2836)
  • change: Bump postcss from 8.5.26 to 8.5.28 in /pkg/sass-parser (#2863)
  • change: Bump pub_api_client from 3.2.0 to 4.0.0
  • …and 27 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sass/dart-sass was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 288d4e202501ea1b943525c88e1d5e5cd225de62 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.