Chalic Chalic - 28 days ago 17
Sass (Sass) Question

SASS - Bootstrap 3 GRID and Navbar only - how?

How I can import Bootstrap 3

grid
and
navbar
to my .sass file?

I tried:

@import bootstrap/variables
@import bootstrap/mixins
//@import bootstrap/mixins/grid-framework
//@import bootstrap/mixins/grid
@import bootstrap/normalize
@import bootstrap/scaffolding
@import bootstrap/print
@import bootstrap/type
@import bootstrap/grid
@import bootstrap/responsive-utilities
@import bootstrap/navbar


But I get an error:

Error: No mixin named form-inline


What is correct way to import a Bootstrap 3 (bootstrap-sass) grid and
navbar
to my project?

I can't find all mixins manually, that's why I need to import
mixins.scss
file..

Answer

I have only had luck importing it the entire suite of sass files, and then commenting out components I know I'm not using in the _bootstrap.scss. You may end up with more than you like to prevent errors.

From the bootstrap SASS github:

By default all of Bootstrap is imported.

You can also import components explicitly. To start with a full list of modules copy _bootstrap.scss file into your assets as _bootstrap-custom.scss. Then comment out components you do not want from _bootstrap-custom. In the application Sass file, replace @import 'bootstrap' with:

@import 'bootstrap-custom';