Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
918 B

//
// Toggle styles (to be used with toggles.js)
// --------------------------------------------------
.toggle {
position: relative;
width: 47px;
height: 30px;
background-color: #fff;
border: 2px solid #ddd;
border-radius: 20px;
@include transition-property(background-color, border);
@include transition-duration(.2s);
// Sliding handle
.toggle-handle {
position: absolute;
top: -1px;
left: -1px;
z-index: 2;
width: 28px;
height: 28px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 100px;
@include transition-property(-webkit-transform, border, width);
@include transition-duration(.2s);
}
// Active state for toggle
&.active {
border: 2px solid $positive-color;
background-color: $positive-color;
.toggle-handle {
border-color: $positive-color;
@include transform(translate3d(17px,0,0));
}
}
}