PostCSS + bootstrap mixins imports

Hi,

My final goal is to be able to use tom-select with importing boostrap.scss file.

To do so, I first try to find a way to instal and import bootstrap with scss and not using full boostrap.min.css provided by the package.
I copied the project juliancwirko/meteor-bootstrap-postcss-test and updated it to use latest meteor and bootstrap.
It wok perfectly and you can find it here GitHub - peernohell/meteor-bootstrap-postcss-test at bootsrtrap-import-mixin

My next step replacing from improting the whole scss of bootstrap by only importing separate files.
To do so I found the instruction in boostrap Importing page.

But when I do it it failed with this error:

While minifying app stylesheet:
app/client/main.css:291:7: postcss-sassy-mixins: /Users/peernohell/tmp/meteor-bootstrap-postcss-test/node_modules/bootstrap/scss/vendor/_rfs.scss:291:7: Undefined mixin _rfs-rule 

Css Syntax Error.

postcss-sassy-mixins: /Users/peernohell/tmp/meteor-bootstrap-postcss-test/node_modules/bootstrap/scss/vendor/_rfs.scss:291:7: Undefined mixin _rfs-rule   289 |     }
  290 |     @else {
> 291 |       @include _rfs-rule () {
      |       ^
  292 |         #{$property}: if($rfs-mode == max-media-query, $val, $fluid-val);
  293 | 

Your application has errors. Waiting for file change.

The issue is that the mixin _rfs-rule is delcare in the same file earlier so I don’t understand why postcss-sassy-mixins didn’t find it.

You can play with the branch bootsrtrap-import-mixin if you want to reproduce.

If anyone can help because I don’t know what I can do to fix that.

Thanks :pray:

Hey @peernohell can you please check the community package at GitHub - Meteor-Community-Packages/meteor-postcss: PostCSS for Meteor ?

What’s the last version you are using?

Hi,

Honestly, we have moved to tailwind so I don’t know if the issue persiste with latest version and will not be able to retry.
Thanks for the help.