I'm installing the bootstrap-sass
gem and this line to do with application.scss confuses me.
'Then, remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.'
Do I remove *= require_self
and *= require_tree .
and replace them with import '@require_self'
and import '@require_tree .'
or just remove them.
Also for any other imported files inside application.scss like
*= require dataTables/jquery.dataTables
*= require froala/froala_editor.min.css
should I change them to
@import 'dataTables/jquery.dataTables'
@import 'froala/froala_editor.min.css'
Just confused and would like a confirmation on what to do here.
In your custom. scss , you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you need. We encourage the latter, though be aware there are some requirements and dependencies across our components.
bootstrap-sass is a Sass-powered version of Bootstrap 3, ready to drop right into your Sass powered applications.
After downloading Bootstrap, and the Sass compiler, in the node-modules directory, there is a folder named bootstrap . There are also three folders inside it: dist , js , and scss . All the compiled CSS is in dist , the Bootstrap JavaScript code in js , and all the Sass files are in the scss folder.
While using bootstrap-sass,remove everything from your application.scss
and instead add the followings to it:
#"bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
@import "bootstrap-sprockets";
@import "bootstrap";
If you wish to load additional scss/sass files then, you can @import them to application.scss
If you wish to load css files then, you can *= require them like the followings:
/*
*= require_self
*= require your_css_file
*/
@import "bootstrap-sprockets";
@import "bootstrap";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With