I started a rails project and added bootstrap gem to the Gemfile. Now I want to enable flexbox which according to the bootstrap 4 documentation is done by editing _variable.scss $enable-flex: true
.
I added $enable-flex: true
in global.scss
and added this file to my application.scss
. But it's not working.
Add $enable-flex: true;
in application.scss
before the line with @import "bootstrap";
it works:
application.scss
$enable-flex: true;
// Custom bootstrap variables must be set or imported before bootstrap itself.
@import "bootstrap";
Have a look at this issue.
It mentions the fix to be a simple variable setup in the _bootstrap-flex.scss
file
$enable-flex: true;
@import "bootstrap";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.