These are chat archives for twbs/bootstrap

3rd
Jun 2018
Rustem Gareev
@rustemgareev
Jun 03 08:59

@Busti This is how you import your Sass files:
Instead of importing the entire Bootstrap .scss file...:

@import "bootstrap/scss/bootstrap";

... you do import only the components you need:

@import "bootstrap/scss/alert";
@import "bootstrap/scss/buttons";
Moritz Bust
@Busti
Jun 03 11:03
That is a good suggestion, Im didn't think about that.
I know that this might be a sass related question, but...
Is it possible to import these styles, without automatically including them into the namespace?
I would like them to only be available when I @extend or @mixin them.
Rustem Gareev
@rustemgareev
Jun 03 11:53
You can import Bootstrap's Sass mixins as well (https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins):
@import "bootstrap/scss/mixins/alert;
@import "bootstrap/scss/mixins/buttons;
But most of them are for color variants, and do not contain complete component styles.