From 0e7a5135298ad559ea0b471c797f8115301a3b87 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 20 Nov 2020 15:32:36 -0500 Subject: [PATCH] Improve bootstrap3 checkbox theming Standardizes our styling of checkboxes in boostrap markup to: `` --- ang/api4Explorer/Explorer.html | 20 +++++++++++------- css/api4-explorer.css | 21 ------------------- ext/greenwich/scss/_tweaks.scss | 8 +++++++ ext/greenwich/scss/main.scss | 1 + .../displays/searchAdminDisplayList.html | 12 ++++++++--- .../displays/searchAdminDisplayTable.html | 8 +++++-- ext/search/css/search.css | 20 ------------------ 7 files changed, 36 insertions(+), 54 deletions(-) create mode 100644 ext/greenwich/scss/_tweaks.scss diff --git a/ang/api4Explorer/Explorer.html b/ang/api4Explorer/Explorer.html index 3dfb253a05..fc2cafc78d 100644 --- a/ang/api4Explorer/Explorer.html +++ b/ang/api4Explorer/Explorer.html @@ -22,14 +22,18 @@
- - +
+ +
+
+ +
diff --git a/css/api4-explorer.css b/css/api4-explorer.css index 6106870c6b..af5cec80a7 100644 --- a/css/api4-explorer.css +++ b/css/api4-explorer.css @@ -103,27 +103,6 @@ background-color: rgba(255, 255, 255, .9); } -#bootstrap-theme.api4-explorer-page div.api4-input.form-inline label.form-control { - margin-right: 6px; -} -#bootstrap-theme.api4-explorer-page div.api4-input.form-inline label.form-control input[type=checkbox] { - margin: 0 2px 0 0; -} - -#bootstrap-theme.api4-explorer-page div.api4-input.form-inline label.form-control:not(.api4-option-selected) { - transition: none; - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - font-weight: normal; -} - -#bootstrap-theme.api4-explorer-page div.api4-input.form-inline .form-control label { - font-weight: normal; - position: relative; - top: -2px; -} - #bootstrap-theme.api4-explorer-page .api4-clause-fieldset fieldset { float: right; width: calc(100% - 58px); diff --git a/ext/greenwich/scss/_tweaks.scss b/ext/greenwich/scss/_tweaks.scss new file mode 100644 index 0000000000..0bab3e6e4e --- /dev/null +++ b/ext/greenwich/scss/_tweaks.scss @@ -0,0 +1,8 @@ +/* Supports adding form-control class to the checkbox-inline class to achieve an outer border around the checkbox&label */ +.form-control.checkbox-inline > label { + margin-left: 9px; +} +/* Adds a nice effect if you place the checkbox label text inside a it will only be bold if the checkbox is checked */ +label input[type=checkbox]:not(:checked) + * { + font-weight: normal; +} diff --git a/ext/greenwich/scss/main.scss b/ext/greenwich/scss/main.scss index 90da6210bb..1539237889 100644 --- a/ext/greenwich/scss/main.scss +++ b/ext/greenwich/scss/main.scss @@ -1,5 +1,6 @@ #bootstrap-theme { @import "greenwich"; @import "bootstrap"; + @import "tweaks"; @import "select2-bootstrap"; } diff --git a/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayList.html b/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayList.html index 926a595e5d..f7f38823dd 100644 --- a/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayList.html +++ b/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayList.html @@ -15,7 +15,9 @@
- +
+ +
@@ -25,7 +27,9 @@ {{ $ctrl.getFieldLabel(col.expr) }}
- +
+ +
@@ -35,7 +39,9 @@ - +
+ +
diff --git a/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayTable.html b/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayTable.html index 18e391633d..b6d5092ac5 100644 --- a/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayTable.html +++ b/ext/search/ang/crmSearchAdmin/displays/searchAdminDisplayTable.html @@ -2,8 +2,12 @@
- - +
+ +
+
+ +
diff --git a/ext/search/css/search.css b/ext/search/css/search.css index 9ade04fef8..c93f709622 100644 --- a/ext/search/css/search.css +++ b/ext/search/css/search.css @@ -77,26 +77,6 @@ background-color: rgba(255, 255, 255, .9); } -#bootstrap-theme.crm-search div.api4-input.form-inline label.form-control { - margin-right: 6px; -} -#bootstrap-theme.crm-search div.api4-input.form-inline label.form-control input[type=checkbox] { - margin: 0 2px 0 0; -} - -#bootstrap-theme.crm-search div.api4-input.form-inline label.form-control:not(.api4-option-selected) { - transition: none; - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - font-weight: normal; -} - -#bootstrap-theme.crm-search div.api4-input.form-inline .form-control label { - font-weight: normal; - position: relative; - top: -2px; -} #bootstrap-theme.crm-search .api4-clause-fieldset fieldset { float: right; width: calc(100% - 58px); -- 2.25.1