Managing Sass Complexity with Module Encapsulation
Stop fighting global variable collisions in Sass. Learn how to use @use and module namespacing in Dart Sass to build a maintainable, encapsulated stylesheet architecture.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop fighting global variable collisions in Sass. Learn how to use @use and module namespacing in Dart Sass to build a maintainable, encapsulated stylesheet architecture.
A practical decision guide for migrating from Sass @import to @use: constraints, trade-offs, a side-by-side comparison table, and a validated migration example with namespace aliases and @forward.
Use Sass modules to namespace design tokens, expose a small public API with @forward, and configure themes without editing token source.
Bulma's Sass variable system uses !default flags and derived tokens to produce a single themed CSS artifact at build time. Override order matters, breakpoint names are public API, and contrast inversions need manual verification.
Stop fighting Bootstrap's compiled CSS with !important. Learn how Sass variables, maps, and the Utility API keep your design tokens maintainable and upgrades boring.
Jeet's ratio-based grid eliminates breakpoint classes but is unmaintained since 2018. This post shows how its fluid columns work, provides a Stylus-to-CSS-Grid migration example, and outlines when to move on.
Sass @import creates a global namespace where variables, mixins, and functions collide. Learn how @use and @forward enforce explicit dependencies, cache modules, and define a clear public API.
Customize Bulma by setting Sass variables before import and using responsive column modifiers instead of custom CSS overrides.
Stop silent variable collisions in large Sass stylesheets by migrating from @import to namespaced @use modules.