From a67f7d0cae31227b1d6da3268c90696d6fe6e4e0 Mon Sep 17 00:00:00 2001 From: "Mark H. Wilkinson" Date: Mon, 29 Mar 2021 11:56:54 +0100 Subject: [PATCH 01/49] Update bootstrap dependency to 5.0.0.beta2 --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 6b625c21..5ef7b5db 100644 --- a/Gemfile +++ b/Gemfile @@ -57,7 +57,7 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] # Custom -gem 'bootstrap', '~> 4.6.0' +gem 'bootstrap', '~> 5.0.0.beta2' gem 'inline_svg', '~> 1.7' gem 'jquery-rails' gem 'kramdown', '~> 2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 1fa5a35a..3d7d0e71 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,14 +62,14 @@ GEM zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - autoprefixer-rails (10.2.0.0) + autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) bootsnap (1.7.2) msgpack (~> 1.0) - bootstrap (4.6.0) + bootstrap (5.0.0.beta2) autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.14.3, < 2) + popper_js (>= 2.8.6, < 3) sassc-rails (>= 2.0.0) builder (3.2.4) byebug (11.1.3) @@ -130,7 +130,7 @@ GEM mini_portile2 (~> 2.5.0) racc (~> 1.4) pg (1.2.3) - popper_js (1.16.0) + popper_js (2.8.6) public_suffix (4.0.6) puma (5.2.1) nio4r (~> 2.0) @@ -233,7 +233,7 @@ PLATFORMS DEPENDENCIES bootsnap (>= 1.4.4) - bootstrap (~> 4.6.0) + bootstrap (~> 5.0.0.beta2) byebug capybara (>= 3.26) diffy From 641ae99919d7c3889d5f1bdc714578a18ab25167 Mon Sep 17 00:00:00 2001 From: "Mark H. Wilkinson" Date: Sat, 3 Apr 2021 23:10:43 +0100 Subject: [PATCH 02/49] .custom-* styles merged in to native ones --- .../_form_collection_label.scss | 24 ------------------- .../_form_floating_labels.scss | 4 +--- .../_form_multi_select.scss | 9 ------- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/app/assets/stylesheets/simple_form-bootstrap/_form_collection_label.scss b/app/assets/stylesheets/simple_form-bootstrap/_form_collection_label.scss index c9bbcca8..26222836 100644 --- a/app/assets/stylesheets/simple_form-bootstrap/_form_collection_label.scss +++ b/app/assets/stylesheets/simple_form-bootstrap/_form_collection_label.scss @@ -7,27 +7,3 @@ } } } - -// optional custom form spacing -.custom-control-inline { - .custom-control-label { - &.collection_check_boxes, - &.collection_radio_buttons { - margin-right: .265625rem; - } - } -} - -// required custom form radio button fix -.form-group.radio_buttons { - > .custom-control { - @extend .custom-radio; - } -} - -// required custom form check box fix -.form-group.check_boxes { - > .custom-control { - @extend .custom-checkbox; - } -} diff --git a/app/assets/stylesheets/simple_form-bootstrap/_form_floating_labels.scss b/app/assets/stylesheets/simple_form-bootstrap/_form_floating_labels.scss index 5484b923..bd2becea 100644 --- a/app/assets/stylesheets/simple_form-bootstrap/_form_floating_labels.scss +++ b/app/assets/stylesheets/simple_form-bootstrap/_form_floating_labels.scss @@ -9,8 +9,7 @@ $sf-floating-input-padding-y: $input-padding-y * 2 !default; margin-bottom: 1rem; } -.form-label-group > input, -.form-label-group > .custom-select:not([multiple]) { +.form-label-group > input { height: 3.125rem; } @@ -58,7 +57,6 @@ $sf-floating-input-padding-y: $input-padding-y * 2 !default; } } - .custom-select, select.form-control { ~ label { width: auto; diff --git a/app/assets/stylesheets/simple_form-bootstrap/_form_multi_select.scss b/app/assets/stylesheets/simple_form-bootstrap/_form_multi_select.scss index 2b693906..1182e073 100644 --- a/app/assets/stylesheets/simple_form-bootstrap/_form_multi_select.scss +++ b/app/assets/stylesheets/simple_form-bootstrap/_form_multi_select.scss @@ -1,4 +1,3 @@ -.custom-select, .form-control { &.date, &.datetime, @@ -7,11 +6,3 @@ &:last-of-type { margin-right: 0 !important; } } } - -.custom-select { - &[multiple], - &:only-child { - margin-left: 0 !important; - margin-right: 0 !important; - } -} From e8f5b8414d0b6d7684d32cb5838e4b9dcf29e5c9 Mon Sep 17 00:00:00 2001 From: "Mark H. Wilkinson" Date: Tue, 30 Mar 2021 15:25:23 +0100 Subject: [PATCH 03/49] Use map-merge to add custom colors to theme --- app/assets/stylesheets/application.scss | 49 ++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index baf024db..87b3e999 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,5 +1,50 @@ -$theme-colors: ( "bootstrap": #563d7c, "simpleform": #00617f ); -@import "bootstrap"; +@import "bootstrap/functions"; + +$custom-colors: ( "bootstrap": #563d7c, "simpleform": #00617f ); + +@import "bootstrap/variables"; +@import "bootstrap/mixins"; + +$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"; + +// Helpers +@import "bootstrap/helpers"; + +// Utilities +@import "bootstrap/utilities/api"; // App sections @import "application/breadcrumb"; From a73b8df4eaf15bca2891f64de49a2a281314a1fa Mon Sep 17 00:00:00 2001 From: "Mark H. Wilkinson" Date: Tue, 30 Mar 2021 15:30:19 +0100 Subject: [PATCH 04/49] Update header markup --- app/views/application/_header.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/application/_header.html.erb b/app/views/application/_header.html.erb index dc36e0cc..702cd493 100644 --- a/app/views/application/_header.html.erb +++ b/app/views/application/_header.html.erb @@ -2,23 +2,23 @@