maoberlehner / node-sass-magic-importer

Custom node-sass importer for selector specific imports, module importing, globbing support and importing files only once.
MIT License
292 stars 28 forks source link

Importing classes generated with @each #225

Open rinu opened 3 years ago

rinu commented 3 years ago

I'm trying to import a class like .d-block from bootstrap's utilities using import { .d-block } from 'node_modules/bootstrap/scss/utilities/display' The display utilities are defined here: https://github.com/twbs/bootstrap/blob/v4.6.0/scss/utilities/_display.scss

Importing from this file directly just doesn't work. I can also import all utilities and not just display but then my css output has the entire utilities and not just the one class.

My goal is to extend bootstrap classes in my own code and generate a css file that doesn't include bootstrap itself.