diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 52197bf5..5859d1c4 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,56 +1,16 @@ -/* - * Keep in sync with `assets/stylesheets/_bootstrap.scss` from - * `bootstrap-rubygem`. - */ - +// 1. Include functions & variables first @import "bootstrap/functions"; - -$custom-colors: ( "bootstrap": #563d7c, "simpleform": #00617f ); - @import "bootstrap/variables"; -@import "bootstrap/mixins"; +$custom-colors: ( + "bootstrap": #563d7c, + "simpleform": #00617f +); $theme-colors: map-merge($theme-colors, $custom-colors); -@import "bootstrap/utilities"; - -// Layout & components -@import "bootstrap/root"; -@import "bootstrap/reboot"; -@import "bootstrap/type"; -@import "bootstrap/images"; -@import "bootstrap/containers"; -@import "bootstrap/grid"; -@import "bootstrap/tables"; -@import "bootstrap/forms"; -@import "bootstrap/buttons"; -@import "bootstrap/transitions"; -@import "bootstrap/dropdown"; -@import "bootstrap/button-group"; -@import "bootstrap/nav"; -@import "bootstrap/navbar"; -@import "bootstrap/card"; -@import "bootstrap/accordion"; -@import "bootstrap/breadcrumb"; -@import "bootstrap/pagination"; -@import "bootstrap/badge"; -@import "bootstrap/alert"; -@import "bootstrap/progress"; -@import "bootstrap/list-group"; -@import "bootstrap/close"; -@import "bootstrap/toasts"; -@import "bootstrap/modal"; -@import "bootstrap/tooltip"; -@import "bootstrap/popover"; -@import "bootstrap/carousel"; -@import "bootstrap/spinners"; -@import "bootstrap/offcanvas"; - -// Helpers -@import "bootstrap/helpers"; +// Custom bootstrap variables must be set or imported *before* bootstrap. +@import "bootstrap"; -// Utilities -@import "bootstrap/utilities/api"; // App sections @import "application/breadcrumb"; diff --git a/app/views/examples/input_groups/_bootstrap.html.erb b/app/views/examples/input_groups/_bootstrap.html.erb index 07eb1137..6368ee65 100644 --- a/app/views/examples/input_groups/_bootstrap.html.erb +++ b/app/views/examples/input_groups/_bootstrap.html.erb @@ -4,7 +4,7 @@
- @ + @
Name can't be blank
Looks good!
@@ -15,9 +15,9 @@
- example- + example- - @gmail.com + @gmail.com
Email can't be blank
Looks good!
@@ -28,7 +28,7 @@
- 🙊 + 🙊
Please provide a valid value.
Looks good!
diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb index 9b70b91c..f30eef89 100644 --- a/config/initializers/simple_form_bootstrap.rb +++ b/config/initializers/simple_form_bootstrap.rb @@ -302,7 +302,7 @@ b.optional :min_max b.optional :readonly b.use :label, class: 'form-label' - b.wrapper :input_group_tag, class: 'input-group has-validation' do |ba| + b.wrapper :input_group_tag, class: 'input-group' do |ba| ba.optional :prepend ba.use :input, class: 'form-control', error_class: 'is-invalid', valid_class: 'is-valid' ba.optional :append diff --git a/test/simple_form-bootstrap/input_group_test.rb b/test/simple_form-bootstrap/input_group_test.rb index 9a33bf87..005b42e3 100644 --- a/test/simple_form-bootstrap/input_group_test.rb +++ b/test/simple_form-bootstrap/input_group_test.rb @@ -11,7 +11,7 @@ def test_input_group_prepend expected = <<-HTML
-
+
$
@@ -26,7 +26,7 @@ def test_input_group_append expected = <<-HTML
-
+
.00
@@ -41,7 +41,7 @@ def test_input_group_prepend_and_append expected = <<-HTML
-
+
$ .00