A collection of custom node-sass importers enabling selector-specific imports, filtering, globbing, and single-import logic.
node-sass-magic-importer is a collection of custom importers for node-sass that enhances Sass `@import` statements with advanced features like selector-specific imports, filtering, globbing, and import-once logic. It solves the problem of CSS bloat by allowing developers to import only the necessary parts from large CSS frameworks, improving performance and maintainability.
Frontend developers and build engineers working with Sass and node-sass who need fine-grained control over CSS imports, especially when using large frameworks like Bootstrap.
Developers choose node-sass-magic-importer for its modular, feature-rich importers that reduce unused CSS, enable precise imports, and integrate seamlessly with existing node-sass workflows, offering a more efficient alternative to standard Sass imports.
Custom node-sass importer for selector specific imports, module importing, globbing support and importing files only once.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows importing only specific selectors from Sass files, as shown with `@import '{ .btn as .button } from ~bootstrap';`, reducing CSS bloat from large frameworks.
Enables filtering by node types like variables or mixins, e.g., `@import '[variables, mixins] from menu.scss';`, improving code organization and reducing unused imports.
Supports glob syntax in imports to match multiple files at once, simplifying import statements for projects with numerous Sass files.
Follows a monorepo approach with separate packages for each importer, allowing developers to use only the features they need without bloat.
Built specifically for node-sass, which has been deprecated in favor of Dart Sass, limiting future compatibility and support.
Requires setting up custom importers in build tools, adding complexity compared to standard Sass imports, especially for simple projects.
Primarily beneficial for optimizing large CSS frameworks; for smaller or modern CSS setups, the benefits may not justify the integration effort.