Added slight darkening during drag

This commit is contained in:
Max Lynch
2014-03-01 16:07:08 -06:00
parent 1974bb5342
commit c53cd7f9d8
3 changed files with 10 additions and 0 deletions

View File

@@ -93,8 +93,10 @@
},
hold: function(e) {
this.el.classList.add('dragging');
},
release: function(e) {
this.el.classList.remove('dragging');
},

View File

@@ -8,6 +8,12 @@
.toggle {
position: relative;
display: inline-block;
&.dragging {
.handle {
background-color: $toggle-handle-dragging-bg-color !important;
}
}
}
/* hide the actual input checkbox */

View File

@@ -419,6 +419,7 @@ $toggle-border-radius: 20px !default;
$toggle-handle-width: $toggle-height - ($toggle-border-width * 2) !default;
$toggle-handle-height: $toggle-handle-width !default;
$toggle-handle-radius: 50% !default;
$toggle-handle-dragging-bg-color: darken(#fff, 5%) !default;
$toggle-off-bg-color: #E5E5E5 !default;
$toggle-off-border-color: #E5E5E5 !default;
@@ -426,6 +427,7 @@ $toggle-off-border-color: #E5E5E5 !default;
$toggle-on-bg-color: #4A87EE !default;
$toggle-on-border-color: $toggle-on-bg-color !default;
$toggle-handle-off-bg-color: $light !default;
$toggle-handle-on-bg-color: $toggle-handle-off-bg-color !default;