I want to use Bootstrap with SASS, but I can\'t find any tutorials or explanation how one can use Bootstrap with SASS. The only thing I find is installatio trough a ruby gem:
(I'm using .sass
files in my answer, but it should apply to .scss
files, too)
Isn't there a bootstrap.scss file that has all the mixins and everything else?
Yes, there is. Here's the generated styles.sass file:
// Import Bootstrap Compass integration
@import "bootstrap-compass"
// Import custom Bootstrap variables
@import "bootstrap-variables"
// Import Bootstrap for Sass
@import "bootstrap"
bootstap_variables
refers to the generated _bootstrap-variables.sass file in your project tree, whereas bootstrap-compass
and bootstrap
are imported from the gem's stylesheets directory.
The latter imports all other Bootstrap files, including the grid:
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";
// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
@import "bootstrap/glyphicons";
// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid"; # <-- here it is
...