Compass CSS framework - using Bootstrap with SASS

走远了吗. 提交于 2019-12-02 11:42:49

(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
...
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!