File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
4141` bootstrap-sprockets ` must be imported before ` bootstrap ` for the icon fonts to work.
4242
4343Make sure the file has ` .css.scss ` extension (or ` .css.sass ` for Sass syntax). If you have just generated a new Rails app,
44- it may come with a ` .css ` file instead. If this file exists, it will be served instead of Sass, so remove it:
44+ it may come with a ` .css ` file instead. If this file exists, it will be served instead of Sass, so rename it:
4545
4646``` console
47- $ rm app/assets/stylesheets/application.css
47+ $ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss
4848```
4949
50+ Then, remove all the ` //= require ` and ` //= require_tree ` statements from the file. Instead, use ` @import ` to import Sass files.
51+
5052Do not use ` //= require ` in Sass or your other stylesheets will not be [ able to access] [ antirequire ] the Bootstrap mixins or variables.
5153
5254Require Bootstrap Javascripts in ` app/assets/javascripts/application.js ` :
You can’t perform that action at this time.
0 commit comments