From 0ef94c04189bceef388b9f0e7412f63dabb582c8 Mon Sep 17 00:00:00 2001 From: shivam sarawagi Date: Fri, 5 Apr 2019 08:02:31 +0530 Subject: [PATCH 1/3] #5270 Align checkbox with the text. --- app/views/editor/rich.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index 014985337a..3b9a4dc9b9 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -129,7 +129,7 @@
Learn more From 40b6aca7f76223b72a3c20f2c09bb77da6e2fb00 Mon Sep 17 00:00:00 2001 From: shivam sarawagi Date: Sat, 6 Apr 2019 22:04:40 +0530 Subject: [PATCH 2/3] #5270 moving css to file --- app/assets/stylesheets/editor.css | 4 ++++ app/views/editor/rich.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/editor.css b/app/assets/stylesheets/editor.css index 2e28ccfd0c..ed1edb0cf3 100644 --- a/app/assets/stylesheets/editor.css +++ b/app/assets/stylesheets/editor.css @@ -106,3 +106,7 @@ margin:3px 10px 10px; width:30%; } + +.checkbox-text-align { + float:left; +} \ No newline at end of file diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index 3b9a4dc9b9..c2d8bc2122 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -129,7 +129,7 @@
Learn more From 2bf612372179dd03e32bb37327cdcdef2d452446 Mon Sep 17 00:00:00 2001 From: sashadev-sky Date: Sun, 7 Apr 2019 05:45:25 -0400 Subject: [PATCH 3/3] Override Bootstrap bug --- app/assets/stylesheets/application.css | 1 + .../btsp_checkbox_override.css.scss | 41 +++++++++ app/views/editor/rich.html.erb | 92 ++++++++++--------- 3 files changed, 91 insertions(+), 43 deletions(-) create mode 100644 app/assets/stylesheets/btsp_checkbox_override.css.scss diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 222ef87dee..ec7256a082 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -19,6 +19,7 @@ *= require_self *= require style *= require feature + *= require btsp_checkbox_override *= require editor *= require blog *= require search diff --git a/app/assets/stylesheets/btsp_checkbox_override.css.scss b/app/assets/stylesheets/btsp_checkbox_override.css.scss new file mode 100644 index 0000000000..5b40db43c9 --- /dev/null +++ b/app/assets/stylesheets/btsp_checkbox_override.css.scss @@ -0,0 +1,41 @@ +/* +https://github.com/twbs/bootstrap/issues/27755 +The issue arises from Bootstrap V4 positioning checkboxes assuming they're a particular +pixel size, but Windows & Mac (and probably other OS's) size them slighlty differently. + +Results in checkboxes not appearing vertically aligned to their labels depending +on the OS used (incompatibility is system-level) and to varying degrees depending on the browser +- see here for ex:https://github.com/publiclab/plots2/pull/5372#pullrequestreview-223542883 + +Note the issue has been flagged to solve for **Bootstrap V5** release. +On update: if resolved, can delete this but ensure compatibility first. +*/ + +/* +- To position checkboxes as hanging controls you should **only indent the labels** +this is v.4 usage as well. +- !important declarations ensure a Bootstrap update wont override these immediately +*/ + +div.form-check { + position: relative !important; + display: block !important; + padding-left: 1.75rem !important; /* btsp's default */ + + label.form-check-label { + margin-bottom: 0 !important; /* Override btsp's default `