|
|
|
//
|
|
|
|
// Toggle styles (to be used with toggles.js)
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.toggle {
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
width: 74px;
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
&:before {
|
|
|
|
position: absolute;
|
|
|
|
top: 3px;
|
|
|
|
right: 11px;
|
|
|
|
color: #999;
|
|
|
|
font-size: 14px;
|
|
|
|
text-transform: uppercase;
|
|
|
|
content: "Off";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Active state for toggle
|
|
|
|
&.active {
|
|
|
|
border: 2px solid $positive-color;
|
|
|
|
background-color: $positive-color;
|
|
|
|
|
|
|
|
.toggle-handle {
|
|
|
|
border-color: $positive-color;
|
|
|
|
@include transform(translate3d(44px,0,0));
|
|
|
|
}
|
|
|
|
&:before {
|
|
|
|
right: auto;
|
|
|
|
left: 15px;
|
|
|
|
color: #fff;
|
|
|
|
content: "On";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Hide the checkbox
|
|
|
|
input[type="checkbox"] {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Toggles in table-views
|
|
|
|
// --------------------------------------------------
|
|
|
|
.table-view {
|
|
|
|
.toggle {
|
|
|
|
margin-top: -4px; // Center the toggle inside the cell
|
|
|
|
}
|
|
|
|
}
|