Implementing the Sass Module System with @use and @forward
Stop using @import in Sass. Learn how to use @use and @forward to implement namespacing, prevent global variable collisions, and build maintainable design systems.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop using @import in Sass. Learn how to use @use and @forward to implement namespacing, prevent global variable collisions, and build maintainable design systems.
Since Dart Sass 1.23, the @use rule loads stylesheets as namespaced modules, and Sass variables like $primary can be referenced through an alias such as t.$primary . The documented behavior for CSS custom properties is different: declarations like --primary are plain CSS rather than Sass variables, so they are not exposed through a module namespace and are n