2014-08-18 18:25:33 +04:00
|
|
|
// main: material.less
|
|
|
|
|
|
|
|
.form-horizontal .checkbox {
|
|
|
|
padding-top: 15px;
|
|
|
|
}
|
|
|
|
.checkbox {
|
|
|
|
label {
|
|
|
|
cursor: pointer;
|
|
|
|
padding-left: 45px;
|
|
|
|
position: relative;
|
|
|
|
span {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
left: 10px;
|
|
|
|
transition-duration: 0.2s;
|
|
|
|
}
|
2014-08-20 14:53:26 +04:00
|
|
|
.ripple {
|
|
|
|
background-color: @lightbg-text;
|
2014-09-07 14:59:27 +04:00
|
|
|
left: -5px;
|
|
|
|
top: -15px;
|
|
|
|
height: 50px;
|
|
|
|
width: 50px;
|
2014-08-18 18:25:33 +04:00
|
|
|
border-radius: 100%;
|
|
|
|
z-index: 1;
|
2014-09-07 14:59:27 +04:00
|
|
|
opacity: 0;
|
2014-08-20 14:53:26 +04:00
|
|
|
margin: 0;
|
2014-08-18 18:25:33 +04:00
|
|
|
}
|
2014-09-07 15:49:49 +04:00
|
|
|
.check {
|
2014-08-20 14:53:26 +04:00
|
|
|
border: 2px solid @lightbg-text;
|
2014-08-18 18:25:33 +04:00
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
2014-09-07 14:59:27 +04:00
|
|
|
.transition-delay(0.2s);
|
2014-08-18 18:25:33 +04:00
|
|
|
}
|
2014-08-20 14:53:26 +04:00
|
|
|
}
|
2014-09-07 14:59:27 +04:00
|
|
|
|
|
|
|
// Variations
|
2014-08-20 14:53:26 +04:00
|
|
|
.variations(~" .check", color, @success);
|
2014-08-18 18:25:33 +04:00
|
|
|
|
2014-09-07 14:59:27 +04:00
|
|
|
// Hide native checkbox
|
|
|
|
input[type=checkbox] { display: none; }
|
|
|
|
|
2014-09-07 15:49:49 +04:00
|
|
|
input[type=checkbox] ~ .check {
|
2014-09-07 14:59:27 +04:00
|
|
|
position: absolute;
|
2014-09-10 11:33:20 +04:00
|
|
|
top: 2px;
|
|
|
|
left: 11px;
|
2014-09-07 14:59:27 +04:00
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
border: solid 2px;
|
|
|
|
border-color: #5a5a5a;
|
|
|
|
.animation(uncheck 300ms ease-out forwards);
|
|
|
|
}
|
|
|
|
|
2014-09-07 15:49:49 +04:00
|
|
|
input[type=checkbox]:checked ~ .check {
|
2014-09-07 14:59:27 +04:00
|
|
|
.animation(check 300ms ease-out forwards);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Ripple effect on click
|
|
|
|
input[type=checkbox]:not(:checked) ~ .ripple {
|
|
|
|
.animation(rippleOff 500ms);
|
|
|
|
}
|
|
|
|
input[type=checkbox]:checked ~ .ripple {
|
|
|
|
.animation(rippleOn 500ms);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Style for disabled inputs
|
2014-09-07 15:49:49 +04:00
|
|
|
input[type=checkbox][disabled]:not(:checked) ~ .check {
|
2014-08-20 14:53:26 +04:00
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
input[type=checkbox][disabled] ~ .ripple {
|
2014-09-07 14:59:27 +04:00
|
|
|
background-color: @lightbg-text;
|
2014-08-18 18:25:33 +04:00
|
|
|
}
|
2014-09-07 14:59:27 +04:00
|
|
|
|
2014-08-20 14:53:26 +04:00
|
|
|
.variations(~" input[type=checkbox]:checked ~ .ripple", background-color, @success);
|
2014-09-07 14:59:27 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@-webkit-keyframes uncheck {
|
|
|
|
0% {
|
|
|
|
top: -3px;
|
|
|
|
left: 17px;
|
|
|
|
width: 10px;
|
|
|
|
height: 21px;
|
|
|
|
border-color: #0f9d58;
|
|
|
|
border-left-color: transparent;
|
|
|
|
border-top-color: transparent;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
top: 14px;
|
|
|
|
left: 17px;
|
|
|
|
width: 4px;
|
|
|
|
height: 4px;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
border-color: #0f9d58;
|
|
|
|
border-left-color: transparent;
|
|
|
|
border-top-color: transparent;
|
|
|
|
}
|
|
|
|
51% {
|
|
|
|
border-color: #5a5a5a;
|
|
|
|
border-left-color: #5a5a5a;
|
|
|
|
border-top-color: #5a5a5a;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
top: 1px;
|
|
|
|
left: 12px;
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
transform: rotate(0deg);
|
|
|
|
border-color: #5a5a5a;
|
|
|
|
border-left-color: #5a5a5a;
|
|
|
|
border-top-color: #5a5a5a;
|
2014-08-18 18:25:33 +04:00
|
|
|
}
|
2014-09-07 14:59:27 +04:00
|
|
|
}
|
2014-08-20 14:53:26 +04:00
|
|
|
|
2014-09-07 21:54:36 +04:00
|
|
|
.keyframe-check() {
|
2014-09-07 14:59:27 +04:00
|
|
|
100% {
|
|
|
|
top: -3px;
|
|
|
|
left: 17px;
|
|
|
|
width: 10px;
|
|
|
|
height: 21px;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
border-color: #0f9d58;
|
|
|
|
border-left-color: transparent;
|
|
|
|
border-top-color: transparent;
|
|
|
|
}
|
|
|
|
51% {
|
|
|
|
border-left: transparent;
|
|
|
|
border-top-color: transparent;
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
top: 14px;
|
|
|
|
left: 17px;
|
|
|
|
width: 4px;
|
|
|
|
height: 4px;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
border-color: #5a5a5a;
|
|
|
|
border-left-color: #5a5a5a;
|
|
|
|
border-top-color: #5a5a5a;
|
|
|
|
}
|
|
|
|
0% {
|
|
|
|
top: 1px;
|
|
|
|
left: 12px;
|
|
|
|
width: 18px;
|
|
|
|
height: 18px;
|
|
|
|
transform: rotate(0deg);
|
|
|
|
border-color: #5a5a5a;
|
|
|
|
border-left-color: #5a5a5a;
|
|
|
|
border-top-color: #5a5a5a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@-webkit-keyframes check {.keyframe-check()}
|
|
|
|
@-moz-keyframes check {.keyframe-check()}
|
|
|
|
@-ms-keyframes check {.keyframe-check()}
|
|
|
|
@-o-keyframes check {.keyframe-check()}
|
|
|
|
@keyframes check {.keyframe-check()}
|
|
|
|
|
2014-09-07 21:54:36 +04:00
|
|
|
.ripple() {
|
2014-09-07 14:59:27 +04:00
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
opacity: 0.2;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
opacity: 0;
|
2014-08-20 14:53:26 +04:00
|
|
|
}
|
2014-08-18 18:25:33 +04:00
|
|
|
}
|
2014-09-07 14:59:27 +04:00
|
|
|
|
|
|
|
@-webkit-keyframes rippleOn {.ripple()}
|
|
|
|
@-moz-keyframes rippleOn {.ripple()}
|
|
|
|
@-ms-keyframes rippleOn {.ripple()}
|
|
|
|
@-o-keyframes rippleOn {.ripple()}
|
|
|
|
@keyframes rippleOn {.ripple()}
|
|
|
|
|
|
|
|
@-webkit-keyframes rippleOff {.ripple()}
|
|
|
|
@-moz-keyframes rippleOff {.ripple()}
|
|
|
|
@-ms-keyframes rippleOn {.ripple()}
|
|
|
|
@-o-keyframes rippleOff {.ripple()}
|
|
|
|
@keyframes rippleOff {.ripple()}
|