Browse Source

Smooth out transitions.

pull/220/head
connors 11 years ago
parent
commit
61e5b835db
  1. 10
      dist/ratchet.css
  2. 5
      lib/sass/toggles.scss

10
dist/ratchet.css vendored

@ -1033,18 +1033,16 @@ input[type="button"] {
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
-webkit-transition-property: -webkit-transform, border, width;
transition-property: -webkit-transform, border, width;
-webkit-transition-duration: 0.1s;
transition-duration: 0.1s;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.toggle:active .toggle-handle {
width: 35px;
}
.toggle.active {
border: 2px solid #4cd964;
-webkit-box-shadow: inset 0 0 0 30px #4cd964;
box-shadow: inset 0 0 0 30px #4cd964;
-webkit-box-shadow: inset 0 0 0 13px #4cd964;
box-shadow: inset 0 0 0 13px #4cd964;
}
.toggle.active .toggle-handle {
border-color: #4cd964;

5
lib/sass/toggles.scss

@ -26,8 +26,7 @@
border-radius: 100px;
@include box-shadow(0 3px 3px rgba(0,0,0,.08));
@include transition-property(-webkit-transform, border, width);
@include transition-duration(.1s);
@include transition-timing-function(ease-in-out);
@include transition-duration(.2s);
}
&:active .toggle-handle {
@ -37,7 +36,7 @@
// Active state for toggle
&.active {
border: 2px solid $positive-color;
@include box-shadow(inset 0 0 0 30px $positive-color);
@include box-shadow(inset 0 0 0 13px $positive-color);
.toggle-handle {
border-color: $positive-color;

Loading…
Cancel
Save