From cc865ef10a4e2863282d2ca237a6a55cd998433e Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 14 Nov 2013 08:31:13 -0600 Subject: [PATCH] checkbox active state fix --- dist/css/ionic.css | 18 ++++++++++++++---- scss/_checkbox.scss | 11 ++++++++--- test/input-checkbox.html | 16 ++++------------ 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 2b597f97c7..513b67506f 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -4215,18 +4215,28 @@ input[type="checkbox"][readonly] { opacity: 1; } /* make sure item content have enough padding on left to fit the checkbox */ -.item-checkbox .item-content { +.item-checkbox { padding-left: 58px; } + .item-checkbox.active, .item-checkbox:active { + box-shadow: none; } /* position the checkbox to the left within an item */ .item-checkbox .checkbox { + display: -webkit-box; + display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + -moz-align-items: center; + align-items: center; position: absolute; top: 0; left: 7.5px; z-index: 3; - display: flex; - height: 100%; - align-items: center; } + height: 100%; } /** * Toggle diff --git a/scss/_checkbox.scss b/scss/_checkbox.scss index a9d53475ef..5b7f6b84c9 100644 --- a/scss/_checkbox.scss +++ b/scss/_checkbox.scss @@ -64,17 +64,22 @@ } /* make sure item content have enough padding on left to fit the checkbox */ -.item-checkbox .item-content { +.item-checkbox { padding-left: ($item-padding * 2) + $checkbox-width; + + &.active, + &:active { + box-shadow: none; + } } /* position the checkbox to the left within an item */ .item-checkbox .checkbox { + @include display-flex(); + @include align-items(center); position: absolute; top: 0; left: $item-padding / 2; z-index: 3; - display: flex; height: 100%; - align-items: center; } diff --git a/test/input-checkbox.html b/test/input-checkbox.html index f56d476366..2dff86edb0 100644 --- a/test/input-checkbox.html +++ b/test/input-checkbox.html @@ -17,36 +17,28 @@