我正在使用gem 'bootstrap', '~> 4.1.3'
运行Rails 5.1,我想激活应用程序中的渐变和阴影。
目前,输入上没有渐变:
我想得到这种外观(阴影而不是实心边框):
我想它链接到_variables.scss中的默认变量(在gem内)
$enable-shadows: false !default;
$enable-gradients: false !default;
我不想修改bootstrap gem本身,因此我尝试在app/assets/stylesheets/application.css.scss
/* Trying to overwrite CSS default variables in SCSS */
$enable-shadows: true;
$enable-gradients: true;
/* Vendor CSS */
@import "bootstrap";
@import "fontawesome-all";
@import "selectize.js-master/dist/css/selectize";
@import "selectize.js-master/dist/css/selectize.bootstrap4";
@import "jquery-ui/autocomplete.css";
@import "devise";
/* My CSS */
@import "colors";
@import "global";
@import "items";
@import "posts";
@import "tags";
@import "users";
@import "welcome";
但是对输入梯度没有影响...我想念什么?
Bootstrap doc变量被覆盖:https://getbootstrap.com/docs/4.0/getting-started/theming/#variable-defaults