mirror of https://github.com/twbs/ratchet.git
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.
61 lines
1.2 KiB
61 lines
1.2 KiB
11 years ago
|
//
|
||
|
// Toggle styles (to be used with toggles.js)
|
||
|
// --------------------------------------------------
|
||
12 years ago
|
|
||
|
.toggle {
|
||
11 years ago
|
display: block;
|
||
12 years ago
|
position: relative;
|
||
11 years ago
|
width: 74px;
|
||
11 years ago
|
height: 30px;
|
||
11 years ago
|
background-color: #fff;
|
||
11 years ago
|
border: 2px solid #ddd;
|
||
12 years ago
|
border-radius: 20px;
|
||
11 years ago
|
@include transition-property(background-color, border);
|
||
11 years ago
|
@include transition-duration(.2s);
|
||
12 years ago
|
|
||
11 years ago
|
// Sliding handle
|
||
|
.toggle-handle {
|
||
|
position: absolute;
|
||
|
top: -1px;
|
||
|
left: -1px;
|
||
|
z-index: 2;
|
||
|
width: 28px;
|
||
|
height: 28px;
|
||
|
background-color: #fff;
|
||
11 years ago
|
border: 1px solid #ddd;
|
||
11 years ago
|
border-radius: 100px;
|
||
11 years ago
|
@include transition-property(-webkit-transform, border, width);
|
||
11 years ago
|
@include transition-duration(.2s);
|
||
11 years ago
|
}
|
||
11 years ago
|
&:before {
|
||
|
position: absolute;
|
||
|
top: 3px;
|
||
|
right: 11px;
|
||
|
color: #999;
|
||
11 years ago
|
font-size: 14px;
|
||
11 years ago
|
text-transform: uppercase;
|
||
|
content: "Off";
|
||
|
}
|
||
12 years ago
|
|
||
11 years ago
|
// Active state for toggle
|
||
|
&.active {
|
||
11 years ago
|
border: 2px solid $positive-color;
|
||
11 years ago
|
background-color: $positive-color;
|
||
11 years ago
|
|
||
11 years ago
|
.toggle-handle {
|
||
|
border-color: $positive-color;
|
||
11 years ago
|
@include transform(translate3d(44px,0,0));
|
||
11 years ago
|
}
|
||
11 years ago
|
&:before {
|
||
|
right: auto;
|
||
|
left: 15px;
|
||
|
color: #fff;
|
||
|
content: "On";
|
||
|
}
|
||
|
}
|
||
|
// Hide the checkbox
|
||
|
input[type="checkbox"] {
|
||
|
display: none;
|
||
11 years ago
|
}
|
||
11 years ago
|
}
|