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 `