From 7fd15984fc0feec06011cc0ac4fa25ee1b520542 Mon Sep 17 00:00:00 2001 From: Brock Whittaker Date: Mon, 31 Oct 2016 15:29:58 -0700 Subject: [PATCH] components: Add a new settings page checkbox. This allows us to style checkboxes to be transparent boxes with green borders. --- static/styles/components.css | 50 ++++++++++++++++++++++++ static/templates/settings_tab.handlebars | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/static/styles/components.css b/static/styles/components.css index 277e810efd..90db7cb837 100644 --- a/static/styles/components.css +++ b/static/styles/components.css @@ -147,3 +147,53 @@ color: #CCC; border-color: #DDD; } + +.new-style label.checkbox { + padding: 0px; + display: inline-block; + vertical-align: top; +} + +.new-style label.checkbox input[type=checkbox] { + display: none; +} + +.new-style label.checkbox + label { + width: calc(100% - 40px); +} + +.new-style label.checkbox input[type=checkbox] ~ span { + display: inline-block; + vertical-align: middle; + position: relative; + top: -2px; + + padding: 1px; + margin: 0px 10px 0px 0px; + height: 16px; + width: 16px; + + font-weight: 300; + line-height: 0.8; + font-size: 1.3rem; + text-align: center; + border: 2px solid #24cac2; + color: #fff; + + border-radius: 4px; + + cursor: pointer; +} + +.new-style label.checkbox input[type=checkbox]:checked ~ span { + color: transparent; + + background-image: url(/static/images/checkbox-green.png); + background-size: 85%; + background-position: 50% 50%; + background-repeat: no-repeat; +} + +.new-style a.no-style { + color: inherit; +} diff --git a/static/templates/settings_tab.handlebars b/static/templates/settings_tab.handlebars index 06d80a9dd1..7f194f8bba 100644 --- a/static/templates/settings_tab.handlebars +++ b/static/templates/settings_tab.handlebars @@ -1,6 +1,6 @@

{{t "Settings" }}

-
+