new style checkbox

This commit is contained in:
colder 2014-10-05 19:55:12 +08:00
parent b8eece9270
commit 11b439386a
14 changed files with 1188 additions and 1344 deletions

View File

@ -2229,48 +2229,92 @@ body .jumbotron-material-lightgrey,
padding: 13px;
font-size: 15px;
}
.form-horizontal .checkbox {
padding-top: 15px;
}
.checkbox {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
min-height: 24px;
position: relative;
cursor: pointer;
}
.checkbox label {
cursor: pointer;
padding-left: 45px;
position: relative;
padding-left: 30px;
}
.checkbox label span {
display: block;
position: absolute;
left: 0px;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.checkbox label .check:after {
display: block;
position: absolute;
content: "";
background-color: rgba(0, 0, 0, 0.84);
left: -5px;
top: -15px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
.checkbox input[type=checkbox] {
opacity: 0;
margin: 0;
}
.checkbox label .check:before {
display: block;
content: "";
border: 2px solid rgba(0, 0, 0, 0.84);
height: 20px;
.checkbox input[type=checkbox] + .check {
left: 0;
width: 20px;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
height: 20px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
-webkit-animation: checkbox-bg-off 0.25s linear forwards;
animation: checkbox-bg-off 0.25s linear forwards;
}
.checkbox input[type=checkbox] + .check,
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
position: absolute;
content: " ";
}
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
top: 50%;
left: 50%;
}
.checkbox input[type=checkbox] + .check:after {
margin-left: -7px;
margin-top: -6px;
width: 14px;
height: 8px;
border-color: transparent;
border-width: 0 0 2px 2px;
border-style: solid;
-webkit-animation: checkbox-marker-off 0.2s linear forwards;
animation: checkbox-marker-off 0.2s linear forwards;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox] + .check:before {
margin-left: -1px;
margin-top: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
opacity: 0;
-webkit-transition: all .1s;
transition: all .1s;
}
.checkbox input[type=checkbox]:disabled + .check {
cursor: not-allowed;
}
.checkbox input[type=checkbox]:focus + .check:before {
height: 50px;
margin-left: -25px;
margin-top: -25px;
width: 50px;
opacity: .08;
}
.checkbox input[type=checkbox]:checked + .check {
border-width: 10px;
-webkit-animation: checkbox-bg-on 0.1s linear forwards;
animation: checkbox-bg-on 0.1s linear forwards;
}
.checkbox input[type=checkbox]:checked + .check:after {
-webkit-animation: checkbox-marker-on 0.15s linear forwards;
animation: checkbox-marker-on 0.15s linear forwards;
}
.checkbox input[type=checkbox]:checked:focus + .check:before {
opacity: .2;
}
.checkbox + .check {
margin-top: -5px;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox .check,
.checkbox-default .check {
@ -2342,319 +2386,187 @@ body .jumbotron-material-lightgrey,
.checkbox-material-lightgrey .check {
color: #ececec;
}
.checkbox input[type=checkbox] {
opacity: 0;
.checkbox.checkbox-inline {
margin-top: 0;
}
.checkbox input[type=checkbox] ~ .check:before {
position: absolute;
top: 2px;
left: 11px;
width: 18px;
height: 18px;
border: solid 2px;
border-color: #5a5a5a;
-webkit-animation: uncheck 300ms ease-out forwards;
animation: uncheck 300ms ease-out forwards;
.input-group-addon .checkbox {
margin: 0;
padding: 0;
}
.checkbox input[type=checkbox]:focus ~ .check:after {
opacity: 0.2;
.checkbox input[type="checkbox"] + .check {
border-color: rgba(0, 0, 0, 0.84);
}
.checkbox input[type=checkbox]:checked ~ .check:before {
-webkit-animation: check 300ms ease-out forwards;
animation: check 300ms ease-out forwards;
}
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
-webkit-animation: rippleOff 500ms linear forwards;
animation: rippleOff 500ms linear forwards;
}
.checkbox input[type=checkbox]:checked ~ .check:after {
-webkit-animation: rippleOn 500ms linear forwards;
animation: rippleOn 500ms linear forwards;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before {
opacity: 0.5;
}
.checkbox input[type=checkbox][disabled] ~ .check:after {
.checkbox input[type="checkbox"] + .check:before {
background-color: rgba(0, 0, 0, 0.84);
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox]:checked ~ .check:after,
.checkbox-default input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-primary input[type=checkbox]:checked ~ .check:after {
background-color: #4285f4;
}
.checkbox-success input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-info input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-warning input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-danger input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-red input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-pink input[type=checkbox]:checked ~ .check:after {
background-color: #e91e63;
}
.checkbox-material-purple input[type=checkbox]:checked ~ .check:after {
background-color: #9c27b0;
}
.checkbox-material-deeppurple input[type=checkbox]:checked ~ .check:after {
background-color: #673ab7;
}
.checkbox-material-indigo input[type=checkbox]:checked ~ .check:after {
background-color: #3f51b5;
}
.checkbox-material-lightblue input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-material-cyan input[type=checkbox]:checked ~ .check:after {
background-color: #00bcd4;
}
.checkbox-material-teal input[type=checkbox]:checked ~ .check:after {
background-color: #009688;
}
.checkbox-material-lightgreen input[type=checkbox]:checked ~ .check:after {
background-color: #8bc34a;
}
.checkbox-material-lime input[type=checkbox]:checked ~ .check:after {
background-color: #cddc39;
}
.checkbox-material-lightyellow input[type=checkbox]:checked ~ .check:after {
background-color: #ffeb3b;
}
.checkbox-material-orange input[type=checkbox]:checked ~ .check:after {
background-color: #ff9800;
}
.checkbox-material-deeporange input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-material-grey input[type=checkbox]:checked ~ .check:after {
background-color: #9e9e9e;
}
.checkbox-material-bluegrey input[type=checkbox]:checked ~ .check:after {
background-color: #607d8b;
}
.checkbox-material-brown input[type=checkbox]:checked ~ .check:after {
background-color: #795548;
}
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check:after {
background-color: #ececec;
}
@-webkit-keyframes uncheck {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
.checkbox input[type="checkbox"]:checked + .check:hover {
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:checked + .check:after {
border-color: rgba(255, 255, 255, 0.84);
}
.checkbox input[type="checkbox"]:disabled + .check,
.checkbox input[type="checkbox"]:disabled + .check:hover {
border-color: rgba(153, 153, 153, 0.84);
}
.checkbox input[type="checkbox"]:checked:focus + .check {
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;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
}
@keyframes uncheck {
.checkbox input[type="checkbox"]:checked:focus + .check:before {
background-color: #6df1b1;
}
@-webkit-keyframes checkbox-bg-off {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
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;
border-width: 10px;
}
100% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 2px;
}
}
@-webkit-keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
}
51% {
border-left: transparent;
border-top-color: transparent;
@keyframes checkbox-bg-off {
0% {
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 10px;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
100% {
border-width: 2px;
}
}
@keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
@-webkit-keyframes checkbox-bg-on {
from {
border-width: 2px;
}
51% {
border-left: transparent;
border-top-color: transparent;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
to {
border-width: 10px;
}
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
@keyframes checkbox-bg-on {
from {
border-width: 2px;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
to {
border-width: 10px;
}
}
@keyframes rippleOn {
/* Checkbox: Marker default/out */
@-webkit-keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@-webkit-keyframes rippleOff {
@keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes rippleOff {
/* Checkbox: Marker in */
@-webkit-keyframes checkbox-marker-on {
0% {
opacity: 0;
border-width: 0;
height: 0;
width: 0;
}
50% {
opacity: 0.2;
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
@keyframes checkbox-marker-on {
0% {
border-width: 0;
height: 0;
width: 0;
}
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
.form-horizontal .radio {
@ -2871,6 +2783,17 @@ body .jumbotron-material-lightgrey,
.radio input[type=radio][disabled] ~ .check {
background-color: rgba(0, 0, 0, 0.84);
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
@ -2882,6 +2805,17 @@ body .jumbotron-material-lightgrey,
opacity: 0;
}
}
@-webkit-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;

File diff suppressed because one or more lines are too long

544
dist/css/material.css vendored
View File

@ -2228,48 +2228,92 @@ body .jumbotron-material-lightgrey,
padding: 13px;
font-size: 15px;
}
.form-horizontal .checkbox {
padding-top: 15px;
}
.checkbox {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
min-height: 24px;
position: relative;
cursor: pointer;
}
.checkbox label {
cursor: pointer;
padding-left: 45px;
position: relative;
padding-left: 30px;
}
.checkbox label span {
display: block;
position: absolute;
left: 0px;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.checkbox label .check:after {
display: block;
position: absolute;
content: "";
background-color: rgba(0, 0, 0, 0.84);
left: -5px;
top: -15px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
.checkbox input[type=checkbox] {
opacity: 0;
margin: 0;
}
.checkbox label .check:before {
display: block;
content: "";
border: 2px solid rgba(0, 0, 0, 0.84);
height: 20px;
.checkbox input[type=checkbox] + .check {
left: 0;
width: 20px;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
height: 20px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
-webkit-animation: checkbox-bg-off 0.25s linear forwards;
animation: checkbox-bg-off 0.25s linear forwards;
}
.checkbox input[type=checkbox] + .check,
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
position: absolute;
content: " ";
}
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
top: 50%;
left: 50%;
}
.checkbox input[type=checkbox] + .check:after {
margin-left: -7px;
margin-top: -6px;
width: 14px;
height: 8px;
border-color: transparent;
border-width: 0 0 2px 2px;
border-style: solid;
-webkit-animation: checkbox-marker-off 0.2s linear forwards;
animation: checkbox-marker-off 0.2s linear forwards;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox] + .check:before {
margin-left: -1px;
margin-top: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
opacity: 0;
-webkit-transition: all .1s;
transition: all .1s;
}
.checkbox input[type=checkbox]:disabled + .check {
cursor: not-allowed;
}
.checkbox input[type=checkbox]:focus + .check:before {
height: 50px;
margin-left: -25px;
margin-top: -25px;
width: 50px;
opacity: .08;
}
.checkbox input[type=checkbox]:checked + .check {
border-width: 10px;
-webkit-animation: checkbox-bg-on 0.1s linear forwards;
animation: checkbox-bg-on 0.1s linear forwards;
}
.checkbox input[type=checkbox]:checked + .check:after {
-webkit-animation: checkbox-marker-on 0.15s linear forwards;
animation: checkbox-marker-on 0.15s linear forwards;
}
.checkbox input[type=checkbox]:checked:focus + .check:before {
opacity: .2;
}
.checkbox + .check {
margin-top: -5px;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox .check,
.checkbox-default .check {
@ -2341,319 +2385,187 @@ body .jumbotron-material-lightgrey,
.checkbox-material-lightgrey .check {
color: #ececec;
}
.checkbox input[type=checkbox] {
opacity: 0;
.checkbox.checkbox-inline {
margin-top: 0;
}
.checkbox input[type=checkbox] ~ .check:before {
position: absolute;
top: 2px;
left: 11px;
width: 18px;
height: 18px;
border: solid 2px;
border-color: #5a5a5a;
-webkit-animation: uncheck 300ms ease-out forwards;
animation: uncheck 300ms ease-out forwards;
.input-group-addon .checkbox {
margin: 0;
padding: 0;
}
.checkbox input[type=checkbox]:focus ~ .check:after {
opacity: 0.2;
.checkbox input[type="checkbox"] + .check {
border-color: rgba(0, 0, 0, 0.84);
}
.checkbox input[type=checkbox]:checked ~ .check:before {
-webkit-animation: check 300ms ease-out forwards;
animation: check 300ms ease-out forwards;
}
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
-webkit-animation: rippleOff 500ms linear forwards;
animation: rippleOff 500ms linear forwards;
}
.checkbox input[type=checkbox]:checked ~ .check:after {
-webkit-animation: rippleOn 500ms linear forwards;
animation: rippleOn 500ms linear forwards;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before {
opacity: 0.5;
}
.checkbox input[type=checkbox][disabled] ~ .check:after {
.checkbox input[type="checkbox"] + .check:before {
background-color: rgba(0, 0, 0, 0.84);
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox]:checked ~ .check:after,
.checkbox-default input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-primary input[type=checkbox]:checked ~ .check:after {
background-color: #4285f4;
}
.checkbox-success input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-info input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-warning input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-danger input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-red input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-pink input[type=checkbox]:checked ~ .check:after {
background-color: #e91e63;
}
.checkbox-material-purple input[type=checkbox]:checked ~ .check:after {
background-color: #9c27b0;
}
.checkbox-material-deeppurple input[type=checkbox]:checked ~ .check:after {
background-color: #673ab7;
}
.checkbox-material-indigo input[type=checkbox]:checked ~ .check:after {
background-color: #3f51b5;
}
.checkbox-material-lightblue input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-material-cyan input[type=checkbox]:checked ~ .check:after {
background-color: #00bcd4;
}
.checkbox-material-teal input[type=checkbox]:checked ~ .check:after {
background-color: #009688;
}
.checkbox-material-lightgreen input[type=checkbox]:checked ~ .check:after {
background-color: #8bc34a;
}
.checkbox-material-lime input[type=checkbox]:checked ~ .check:after {
background-color: #cddc39;
}
.checkbox-material-lightyellow input[type=checkbox]:checked ~ .check:after {
background-color: #ffeb3b;
}
.checkbox-material-orange input[type=checkbox]:checked ~ .check:after {
background-color: #ff9800;
}
.checkbox-material-deeporange input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-material-grey input[type=checkbox]:checked ~ .check:after {
background-color: #9e9e9e;
}
.checkbox-material-bluegrey input[type=checkbox]:checked ~ .check:after {
background-color: #607d8b;
}
.checkbox-material-brown input[type=checkbox]:checked ~ .check:after {
background-color: #795548;
}
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check:after {
background-color: #ececec;
}
@-webkit-keyframes uncheck {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
.checkbox input[type="checkbox"]:checked + .check:hover {
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:checked + .check:after {
border-color: rgba(255, 255, 255, 0.84);
}
.checkbox input[type="checkbox"]:disabled + .check,
.checkbox input[type="checkbox"]:disabled + .check:hover {
border-color: rgba(153, 153, 153, 0.84);
}
.checkbox input[type="checkbox"]:checked:focus + .check {
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;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
}
@keyframes uncheck {
.checkbox input[type="checkbox"]:checked:focus + .check:before {
background-color: #6df1b1;
}
@-webkit-keyframes checkbox-bg-off {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
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;
border-width: 10px;
}
100% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 2px;
}
}
@-webkit-keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
}
51% {
border-left: transparent;
border-top-color: transparent;
@keyframes checkbox-bg-off {
0% {
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 10px;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
100% {
border-width: 2px;
}
}
@keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
@-webkit-keyframes checkbox-bg-on {
from {
border-width: 2px;
}
51% {
border-left: transparent;
border-top-color: transparent;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
to {
border-width: 10px;
}
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
@keyframes checkbox-bg-on {
from {
border-width: 2px;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
to {
border-width: 10px;
}
}
@keyframes rippleOn {
/* Checkbox: Marker default/out */
@-webkit-keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@-webkit-keyframes rippleOff {
@keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes rippleOff {
/* Checkbox: Marker in */
@-webkit-keyframes checkbox-marker-on {
0% {
opacity: 0;
border-width: 0;
height: 0;
width: 0;
}
50% {
opacity: 0.2;
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
@keyframes checkbox-marker-on {
0% {
border-width: 0;
height: 0;
width: 0;
}
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
.form-horizontal .radio {
@ -2870,6 +2782,17 @@ body .jumbotron-material-lightgrey,
.radio input[type=radio][disabled] ~ .check {
background-color: rgba(0, 0, 0, 0.84);
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
@ -2881,6 +2804,17 @@ body .jumbotron-material-lightgrey,
opacity: 0;
}
}
@-webkit-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;

File diff suppressed because one or more lines are too long

26
dist/js/material.js vendored
View File

@ -37,6 +37,25 @@ $(function (){
};
initInputs();
var ANIMATION_END_EVENT = (function() {
var eventName,
ANIMATION_END_EVENT_NAMES = {
"animation": "animationend",
"-o-animation": "oAnimationEnd",
"-moz-animation": "animationend",
"-webkit-animation": "webkitAnimationEnd",
"-ms-animation": "animationend"
},
animateFakeEl = document.createElement("animatefakeelement");
for (eventName in ANIMATION_END_EVENT_NAMES) {
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
return ANIMATION_END_EVENT_NAMES[eventName];
}
}
return null;
})();
// Support for "arrive.js" to dynamically detect creation of elements
// include it before this script to take advantage of this feature
// https://github.com/uzairfarooq/arrive/
@ -47,7 +66,12 @@ $(function (){
}
$(document).on("change", ".checkbox input", function() {
$(this).blur();
// safari cannot auto focus when click.
var $checkbox = $(this).focus();
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function () {
console.log(ANIMATION_END_EVENT);
$checkbox.blur();
});
});
$(document).on("keyup change", ".form-control", function() {

View File

@ -1 +1 @@
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a(),document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){$(this).blur()}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){console.log(b),a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});

View File

@ -1,191 +1,227 @@
// main: material.less
.form-horizontal .checkbox {
padding-top: 15px;
}
// Sizes
@checkbox-size: 20px;
.checkbox {
transform: rotate(0deg);
label {
cursor: pointer;
padding-left: 45px;
min-height: 24px; // clear the floating input if there is no label text
position: relative;
span {
display: block;
position: absolute;
left: 0px;
transition-duration: 0.2s;
cursor: pointer;
label {
position: relative;
padding-left: 30px;
}
.check:after {
display: block;
position: absolute;
content: "";
background-color: @lightbg-text;
left: -5px;
top: -15px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
input[type=checkbox] {
opacity: 0;
margin: 0;
// Here are our placeholder
// The Material Design skin occours right here ;-)
&+ .check {
left: 0;
width: @checkbox-size;
height: @checkbox-size;
border-radius: 2px;
border-width: 2px;
border-style: solid;
animation: checkbox-bg-off .25s linear forwards;
&, &:after, &:before {
position: absolute;
content: " ";
}
.check:before {
display: block;
content: "";
border: 2px solid @lightbg-text;
height: 20px;
width: 20px;
transition-delay: 0.2s;
&:after, &:before {
top: 50%;
left: 50%;
}
// Marker
// The Checked Marker (✓);
// I`ve used the after selector to prevent bloated code
&:after {
margin-left: -7px;
margin-top: -6px;
width: 14px;
height: 8px;
border-color: transparent;
border-width: 0 0 2px 2px;
border-style: solid;
animation: checkbox-marker-off .2s linear forwards;
transform: rotate(-45deg);
}
// Accessibility check
// This is visible when you focus/click the input element
&:before {
margin-left: -1px;
margin-top: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
opacity: 0;
transition: all .1s;
}
}
// Disabled Status
&:disabled + .check {
cursor: not-allowed;
}
// Focus Status
&:focus + .check {
// Remember, this is the accessibility check
&:before {
height: 50px;
margin-left: -25px;
margin-top: -25px;
width: 50px;
opacity: .08;
}
}
// Checked Status
&:checked + .check {
border-width: 10px;
animation: checkbox-bg-on .1s linear forwards;
// The ✓
&:after {
animation: checkbox-marker-on .15s linear forwards;
}
}
// Checked & Focus Status
&:checked:focus + .check {
&:before {
opacity: .2;
}
}
}
& + .check {
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
}
// Make animate quickly when not hover
&:not(:hover) input[type=checkbox] ~ .check {
&, &:after {
animation-duration: 1ms;
}
}
// Variations
.variations(~" .check", color, @success);
// Hide native checkbox
input[type=checkbox] { opacity: 0; }
&.checkbox-inline {
margin-top: 0;
}
}
input[type=checkbox] ~ .check:before {
position: absolute;
top: 2px;
left: 11px;
width: 18px;
height: 18px;
border: solid 2px;
border-color: #5a5a5a;
animation: uncheck 300ms ease-out forwards;
.input-group-addon {
.checkbox {
margin: 0;
padding: 0;
}
}
input[type=checkbox]:focus ~ .check:after {
opacity: 0.2;
}
input[type=checkbox]:checked ~ .check:before {
animation: check 300ms ease-out forwards;
}
// Ripple effect on click
input[type=checkbox]:not(:checked) ~ .check:after {
animation: rippleOff 500ms linear forwards;
}
input[type=checkbox]:checked ~ .check:after {
animation: rippleOn 500ms linear forwards;
}
// Make animate quickly when not hover
&:not(:hover) input[type=checkbox] ~ .check {
&:before, &:after {
animation-duration: 1ms;
}
}
// Style for disabled inputs
input[type=checkbox][disabled]:not(:checked) ~ .check:before {
opacity: 0.5;
}
input[type=checkbox][disabled] ~ .check:after {
// Default Theme
.checkbox {
input[type="checkbox"] {
& + .check {
border-color: @lightbg-text;
&:before {
background-color: @lightbg-text;
transform: rotate(-45deg);
}
.variations(~" input[type=checkbox]:checked ~ .check:after", background-color, @success);
}
&:checked + .check {
&:hover {
border-color: @success;
}
&:after {
border-color: @darkbg-text;
}
}
&:disabled + .check {
&, &:hover {
border-color: lighten(@lightbg-text, 60%);
}
}
&:checked:focus + .check {
border-color: @success;
&:before {
background-color: lighten(@success, 35%);
}
}
}
}
@keyframes uncheck {
// Checkbox: Background OFF
@keyframes checkbox-bg-off {
0% { border-width: 10px; }
50% { border-width: 10px; }
100% { border-width: 2px; }
}
// Checkbox: Background ON
@keyframes checkbox-bg-on {
from { border-width: 2px; }
to { border-width: 10px; }
}
/* Checkbox: Marker default/out */
@keyframes checkbox-marker-off {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
transform: rotate(45deg);
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
51% {
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes check {
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;
}
/* Checkbox: Marker in */
@keyframes checkbox-marker-on {
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
40% {
border-width: 0;
height: 0;
width: 0;
}
50% {
opacity: 0.2;
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}

View File

@ -37,6 +37,26 @@ $(function (){
};
initInputs();
// Detect animationend event name.
var ANIMATION_END_EVENT = (function() {
var eventName,
ANIMATION_END_EVENT_NAMES = {
"animation": "animationend",
"-o-animation": "oAnimationEnd",
"-moz-animation": "animationend",
"-webkit-animation": "webkitAnimationEnd",
"-ms-animation": "animationend"
},
animateFakeEl = document.createElement("animatefakeelement");
for (eventName in ANIMATION_END_EVENT_NAMES) {
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
return ANIMATION_END_EVENT_NAMES[eventName];
}
}
return null;
})();
// Support for "arrive.js" to dynamically detect creation of elements
// include it before this script to take advantage of this feature
// https://github.com/uzairfarooq/arrive/
@ -47,7 +67,11 @@ $(function (){
}
$(document).on("change", ".checkbox input", function() {
$(this).blur();
// safari cannot auto focus when click.
var $checkbox = $(this).focus();
$checkbox.find("+ .check").one(ANIMATION_END_EVENT, function () {
$checkbox.blur();
});
});
$(document).on("keyup change", ".form-control", function() {

View File

@ -2229,48 +2229,92 @@ body .jumbotron-material-lightgrey,
padding: 13px;
font-size: 15px;
}
.form-horizontal .checkbox {
padding-top: 15px;
}
.checkbox {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
min-height: 24px;
position: relative;
cursor: pointer;
}
.checkbox label {
cursor: pointer;
padding-left: 45px;
position: relative;
padding-left: 30px;
}
.checkbox label span {
display: block;
position: absolute;
left: 0px;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.checkbox label .check:after {
display: block;
position: absolute;
content: "";
background-color: rgba(0, 0, 0, 0.84);
left: -5px;
top: -15px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
.checkbox input[type=checkbox] {
opacity: 0;
margin: 0;
}
.checkbox label .check:before {
display: block;
content: "";
border: 2px solid rgba(0, 0, 0, 0.84);
height: 20px;
.checkbox input[type=checkbox] + .check {
left: 0;
width: 20px;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
height: 20px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
-webkit-animation: checkbox-bg-off 0.25s linear forwards;
animation: checkbox-bg-off 0.25s linear forwards;
}
.checkbox input[type=checkbox] + .check,
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
position: absolute;
content: " ";
}
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
top: 50%;
left: 50%;
}
.checkbox input[type=checkbox] + .check:after {
margin-left: -7px;
margin-top: -6px;
width: 14px;
height: 8px;
border-color: transparent;
border-width: 0 0 2px 2px;
border-style: solid;
-webkit-animation: checkbox-marker-off 0.2s linear forwards;
animation: checkbox-marker-off 0.2s linear forwards;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox] + .check:before {
margin-left: -1px;
margin-top: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
opacity: 0;
-webkit-transition: all .1s;
transition: all .1s;
}
.checkbox input[type=checkbox]:disabled + .check {
cursor: not-allowed;
}
.checkbox input[type=checkbox]:focus + .check:before {
height: 50px;
margin-left: -25px;
margin-top: -25px;
width: 50px;
opacity: .08;
}
.checkbox input[type=checkbox]:checked + .check {
border-width: 10px;
-webkit-animation: checkbox-bg-on 0.1s linear forwards;
animation: checkbox-bg-on 0.1s linear forwards;
}
.checkbox input[type=checkbox]:checked + .check:after {
-webkit-animation: checkbox-marker-on 0.15s linear forwards;
animation: checkbox-marker-on 0.15s linear forwards;
}
.checkbox input[type=checkbox]:checked:focus + .check:before {
opacity: .2;
}
.checkbox + .check {
margin-top: -5px;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox .check,
.checkbox-default .check {
@ -2342,319 +2386,187 @@ body .jumbotron-material-lightgrey,
.checkbox-material-lightgrey .check {
color: #ececec;
}
.checkbox input[type=checkbox] {
opacity: 0;
.checkbox.checkbox-inline {
margin-top: 0;
}
.checkbox input[type=checkbox] ~ .check:before {
position: absolute;
top: 2px;
left: 11px;
width: 18px;
height: 18px;
border: solid 2px;
border-color: #5a5a5a;
-webkit-animation: uncheck 300ms ease-out forwards;
animation: uncheck 300ms ease-out forwards;
.input-group-addon .checkbox {
margin: 0;
padding: 0;
}
.checkbox input[type=checkbox]:focus ~ .check:after {
opacity: 0.2;
.checkbox input[type="checkbox"] + .check {
border-color: rgba(0, 0, 0, 0.84);
}
.checkbox input[type=checkbox]:checked ~ .check:before {
-webkit-animation: check 300ms ease-out forwards;
animation: check 300ms ease-out forwards;
}
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
-webkit-animation: rippleOff 500ms linear forwards;
animation: rippleOff 500ms linear forwards;
}
.checkbox input[type=checkbox]:checked ~ .check:after {
-webkit-animation: rippleOn 500ms linear forwards;
animation: rippleOn 500ms linear forwards;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before {
opacity: 0.5;
}
.checkbox input[type=checkbox][disabled] ~ .check:after {
.checkbox input[type="checkbox"] + .check:before {
background-color: rgba(0, 0, 0, 0.84);
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox]:checked ~ .check:after,
.checkbox-default input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-primary input[type=checkbox]:checked ~ .check:after {
background-color: #4285f4;
}
.checkbox-success input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-info input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-warning input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-danger input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-red input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-pink input[type=checkbox]:checked ~ .check:after {
background-color: #e91e63;
}
.checkbox-material-purple input[type=checkbox]:checked ~ .check:after {
background-color: #9c27b0;
}
.checkbox-material-deeppurple input[type=checkbox]:checked ~ .check:after {
background-color: #673ab7;
}
.checkbox-material-indigo input[type=checkbox]:checked ~ .check:after {
background-color: #3f51b5;
}
.checkbox-material-lightblue input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-material-cyan input[type=checkbox]:checked ~ .check:after {
background-color: #00bcd4;
}
.checkbox-material-teal input[type=checkbox]:checked ~ .check:after {
background-color: #009688;
}
.checkbox-material-lightgreen input[type=checkbox]:checked ~ .check:after {
background-color: #8bc34a;
}
.checkbox-material-lime input[type=checkbox]:checked ~ .check:after {
background-color: #cddc39;
}
.checkbox-material-lightyellow input[type=checkbox]:checked ~ .check:after {
background-color: #ffeb3b;
}
.checkbox-material-orange input[type=checkbox]:checked ~ .check:after {
background-color: #ff9800;
}
.checkbox-material-deeporange input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-material-grey input[type=checkbox]:checked ~ .check:after {
background-color: #9e9e9e;
}
.checkbox-material-bluegrey input[type=checkbox]:checked ~ .check:after {
background-color: #607d8b;
}
.checkbox-material-brown input[type=checkbox]:checked ~ .check:after {
background-color: #795548;
}
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check:after {
background-color: #ececec;
}
@-webkit-keyframes uncheck {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
.checkbox input[type="checkbox"]:checked + .check:hover {
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:checked + .check:after {
border-color: rgba(255, 255, 255, 0.84);
}
.checkbox input[type="checkbox"]:disabled + .check,
.checkbox input[type="checkbox"]:disabled + .check:hover {
border-color: rgba(153, 153, 153, 0.84);
}
.checkbox input[type="checkbox"]:checked:focus + .check {
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;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
}
@keyframes uncheck {
.checkbox input[type="checkbox"]:checked:focus + .check:before {
background-color: #6df1b1;
}
@-webkit-keyframes checkbox-bg-off {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
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;
border-width: 10px;
}
100% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 2px;
}
}
@-webkit-keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
}
51% {
border-left: transparent;
border-top-color: transparent;
@keyframes checkbox-bg-off {
0% {
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 10px;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
100% {
border-width: 2px;
}
}
@keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
@-webkit-keyframes checkbox-bg-on {
from {
border-width: 2px;
}
51% {
border-left: transparent;
border-top-color: transparent;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
to {
border-width: 10px;
}
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
@keyframes checkbox-bg-on {
from {
border-width: 2px;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
to {
border-width: 10px;
}
}
@keyframes rippleOn {
/* Checkbox: Marker default/out */
@-webkit-keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@-webkit-keyframes rippleOff {
@keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes rippleOff {
/* Checkbox: Marker in */
@-webkit-keyframes checkbox-marker-on {
0% {
opacity: 0;
border-width: 0;
height: 0;
width: 0;
}
50% {
opacity: 0.2;
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
@keyframes checkbox-marker-on {
0% {
border-width: 0;
height: 0;
width: 0;
}
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
.form-horizontal .radio {
@ -2871,6 +2783,17 @@ body .jumbotron-material-lightgrey,
.radio input[type=radio][disabled] ~ .check {
background-color: rgba(0, 0, 0, 0.84);
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
@ -2882,6 +2805,17 @@ body .jumbotron-material-lightgrey,
opacity: 0;
}
}
@-webkit-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;

File diff suppressed because one or more lines are too long

View File

@ -2228,48 +2228,92 @@ body .jumbotron-material-lightgrey,
padding: 13px;
font-size: 15px;
}
.form-horizontal .checkbox {
padding-top: 15px;
}
.checkbox {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
min-height: 24px;
position: relative;
cursor: pointer;
}
.checkbox label {
cursor: pointer;
padding-left: 45px;
position: relative;
padding-left: 30px;
}
.checkbox label span {
display: block;
position: absolute;
left: 0px;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.checkbox label .check:after {
display: block;
position: absolute;
content: "";
background-color: rgba(0, 0, 0, 0.84);
left: -5px;
top: -15px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
.checkbox input[type=checkbox] {
opacity: 0;
margin: 0;
}
.checkbox label .check:before {
display: block;
content: "";
border: 2px solid rgba(0, 0, 0, 0.84);
height: 20px;
.checkbox input[type=checkbox] + .check {
left: 0;
width: 20px;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
height: 20px;
border-radius: 2px;
border-width: 2px;
border-style: solid;
-webkit-animation: checkbox-bg-off 0.25s linear forwards;
animation: checkbox-bg-off 0.25s linear forwards;
}
.checkbox input[type=checkbox] + .check,
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
position: absolute;
content: " ";
}
.checkbox input[type=checkbox] + .check:after,
.checkbox input[type=checkbox] + .check:before {
top: 50%;
left: 50%;
}
.checkbox input[type=checkbox] + .check:after {
margin-left: -7px;
margin-top: -6px;
width: 14px;
height: 8px;
border-color: transparent;
border-width: 0 0 2px 2px;
border-style: solid;
-webkit-animation: checkbox-marker-off 0.2s linear forwards;
animation: checkbox-marker-off 0.2s linear forwards;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox] + .check:before {
margin-left: -1px;
margin-top: -1px;
width: 2px;
height: 2px;
border-radius: 50%;
opacity: 0;
-webkit-transition: all .1s;
transition: all .1s;
}
.checkbox input[type=checkbox]:disabled + .check {
cursor: not-allowed;
}
.checkbox input[type=checkbox]:focus + .check:before {
height: 50px;
margin-left: -25px;
margin-top: -25px;
width: 50px;
opacity: .08;
}
.checkbox input[type=checkbox]:checked + .check {
border-width: 10px;
-webkit-animation: checkbox-bg-on 0.1s linear forwards;
animation: checkbox-bg-on 0.1s linear forwards;
}
.checkbox input[type=checkbox]:checked + .check:after {
-webkit-animation: checkbox-marker-on 0.15s linear forwards;
animation: checkbox-marker-on 0.15s linear forwards;
}
.checkbox input[type=checkbox]:checked:focus + .check:before {
opacity: .2;
}
.checkbox + .check {
margin-top: -5px;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox .check,
.checkbox-default .check {
@ -2341,319 +2385,187 @@ body .jumbotron-material-lightgrey,
.checkbox-material-lightgrey .check {
color: #ececec;
}
.checkbox input[type=checkbox] {
opacity: 0;
.checkbox.checkbox-inline {
margin-top: 0;
}
.checkbox input[type=checkbox] ~ .check:before {
position: absolute;
top: 2px;
left: 11px;
width: 18px;
height: 18px;
border: solid 2px;
border-color: #5a5a5a;
-webkit-animation: uncheck 300ms ease-out forwards;
animation: uncheck 300ms ease-out forwards;
.input-group-addon .checkbox {
margin: 0;
padding: 0;
}
.checkbox input[type=checkbox]:focus ~ .check:after {
opacity: 0.2;
.checkbox input[type="checkbox"] + .check {
border-color: rgba(0, 0, 0, 0.84);
}
.checkbox input[type=checkbox]:checked ~ .check:before {
-webkit-animation: check 300ms ease-out forwards;
animation: check 300ms ease-out forwards;
}
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
-webkit-animation: rippleOff 500ms linear forwards;
animation: rippleOff 500ms linear forwards;
}
.checkbox input[type=checkbox]:checked ~ .check:after {
-webkit-animation: rippleOn 500ms linear forwards;
animation: rippleOn 500ms linear forwards;
}
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
-webkit-animation-duration: 1ms;
animation-duration: 1ms;
}
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before {
opacity: 0.5;
}
.checkbox input[type=checkbox][disabled] ~ .check:after {
.checkbox input[type="checkbox"] + .check:before {
background-color: rgba(0, 0, 0, 0.84);
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.checkbox input[type=checkbox]:checked ~ .check:after,
.checkbox-default input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-primary input[type=checkbox]:checked ~ .check:after {
background-color: #4285f4;
}
.checkbox-success input[type=checkbox]:checked ~ .check:after {
background-color: #0f9d58;
}
.checkbox-info input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-warning input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-danger input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-red input[type=checkbox]:checked ~ .check:after {
background-color: #f44336;
}
.checkbox-material-pink input[type=checkbox]:checked ~ .check:after {
background-color: #e91e63;
}
.checkbox-material-purple input[type=checkbox]:checked ~ .check:after {
background-color: #9c27b0;
}
.checkbox-material-deeppurple input[type=checkbox]:checked ~ .check:after {
background-color: #673ab7;
}
.checkbox-material-indigo input[type=checkbox]:checked ~ .check:after {
background-color: #3f51b5;
}
.checkbox-material-lightblue input[type=checkbox]:checked ~ .check:after {
background-color: #03a9f4;
}
.checkbox-material-cyan input[type=checkbox]:checked ~ .check:after {
background-color: #00bcd4;
}
.checkbox-material-teal input[type=checkbox]:checked ~ .check:after {
background-color: #009688;
}
.checkbox-material-lightgreen input[type=checkbox]:checked ~ .check:after {
background-color: #8bc34a;
}
.checkbox-material-lime input[type=checkbox]:checked ~ .check:after {
background-color: #cddc39;
}
.checkbox-material-lightyellow input[type=checkbox]:checked ~ .check:after {
background-color: #ffeb3b;
}
.checkbox-material-orange input[type=checkbox]:checked ~ .check:after {
background-color: #ff9800;
}
.checkbox-material-deeporange input[type=checkbox]:checked ~ .check:after {
background-color: #ff5722;
}
.checkbox-material-grey input[type=checkbox]:checked ~ .check:after {
background-color: #9e9e9e;
}
.checkbox-material-bluegrey input[type=checkbox]:checked ~ .check:after {
background-color: #607d8b;
}
.checkbox-material-brown input[type=checkbox]:checked ~ .check:after {
background-color: #795548;
}
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check:after {
background-color: #ececec;
}
@-webkit-keyframes uncheck {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
.checkbox input[type="checkbox"]:checked + .check:hover {
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:checked + .check:after {
border-color: rgba(255, 255, 255, 0.84);
}
.checkbox input[type="checkbox"]:disabled + .check,
.checkbox input[type="checkbox"]:disabled + .check:hover {
border-color: rgba(153, 153, 153, 0.84);
}
.checkbox input[type="checkbox"]:checked:focus + .check {
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;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
}
@keyframes uncheck {
.checkbox input[type="checkbox"]:checked:focus + .check:before {
background-color: #6df1b1;
}
@-webkit-keyframes checkbox-bg-off {
0% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
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;
border-width: 10px;
}
100% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 2px;
}
}
@-webkit-keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
}
51% {
border-left: transparent;
border-top-color: transparent;
@keyframes checkbox-bg-off {
0% {
border-width: 10px;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
border-width: 10px;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
100% {
border-width: 2px;
}
}
@keyframes check {
100% {
top: -3px;
left: 17px;
width: 10px;
height: 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #0f9d58;
border-left-color: transparent;
border-top-color: transparent;
@-webkit-keyframes checkbox-bg-on {
from {
border-width: 2px;
}
51% {
border-left: transparent;
border-top-color: transparent;
}
50% {
top: 14px;
left: 17px;
width: 4px;
height: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
}
0% {
top: 1px;
left: 12px;
width: 18px;
height: 18px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-color: #5a5a5a;
border-left-color: #5a5a5a;
border-top-color: #5a5a5a;
to {
border-width: 10px;
}
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
@keyframes checkbox-bg-on {
from {
border-width: 2px;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
to {
border-width: 10px;
}
}
@keyframes rippleOn {
/* Checkbox: Marker default/out */
@-webkit-keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@-webkit-keyframes rippleOff {
@keyframes checkbox-marker-off {
0% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
50% {
opacity: 0.2;
40% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: -4px;
margin-top: -1px;
width: 14px;
}
70% {
border-color: #fff;
border-width: 0 0 2px 0;
height: 0;
margin-left: 6px;
margin-top: -5px;
width: 0;
}
100% {
opacity: 0;
border-color: #fff;
border-width: 0;
height: 0;
width: 0;
}
}
@keyframes rippleOff {
/* Checkbox: Marker in */
@-webkit-keyframes checkbox-marker-on {
0% {
opacity: 0;
border-width: 0;
height: 0;
width: 0;
}
50% {
opacity: 0.2;
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
opacity: 0;
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
@keyframes checkbox-marker-on {
0% {
border-width: 0;
height: 0;
width: 0;
}
40% {
border-width: 0;
height: 0;
width: 0;
}
70% {
border-width: 0 0 0 2px;
height: 8px;
margin-left: -6px;
margin-top: -2px;
width: 0;
}
100% {
border-width: 0 0 2px 2px;
height: 8px;
margin-left: -7px;
margin-top: -6px;
width: 14px;
}
}
.form-horizontal .radio {
@ -2870,6 +2782,17 @@ body .jumbotron-material-lightgrey,
.radio input[type=radio][disabled] ~ .check {
background-color: rgba(0, 0, 0, 0.84);
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
@ -2881,6 +2804,17 @@ body .jumbotron-material-lightgrey,
opacity: 0;
}
}
@-webkit-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;

File diff suppressed because one or more lines are too long

View File

@ -37,6 +37,25 @@ $(function (){
};
initInputs();
var ANIMATION_END_EVENT = (function() {
var eventName,
ANIMATION_END_EVENT_NAMES = {
"animation": "animationend",
"-o-animation": "oAnimationEnd",
"-moz-animation": "animationend",
"-webkit-animation": "webkitAnimationEnd",
"-ms-animation": "animationend"
},
animateFakeEl = document.createElement("animatefakeelement");
for (eventName in ANIMATION_END_EVENT_NAMES) {
if (typeof(animateFakeEl.style[eventName]) !== "undefined") {
return ANIMATION_END_EVENT_NAMES[eventName];
}
}
return null;
})();
// Support for "arrive.js" to dynamically detect creation of elements
// include it before this script to take advantage of this feature
// https://github.com/uzairfarooq/arrive/
@ -47,7 +66,12 @@ $(function (){
}
$(document).on("change", ".checkbox input", function() {
$(this).blur();
// safari cannot auto focus when click.
var $checkbox = $(this).focus();
$(":before", this).one(ANIMATION_END_EVENT, function () {
console.log(ANIMATION_END_EVENT);
$checkbox.blur();
});
});
$(document).on("keyup change", ".form-control", function() {

View File

@ -1 +1 @@
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a(),document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){$(this).blur()}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});
$(function(){"object"==typeof ripples&&ripples.init(".btn:not(.btn-link), .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple");var a=function(){$(".checkbox > label > input").not(".bs-material").addClass("bs-material").after("<span class=check></span>"),$(".radio > label > input").not(".bs-material").addClass("bs-material").after("<span class=circle></span><span class=check></span>"),$("input.form-control, textarea.form-control, select.form-control").not(".bs-material").each(function(){if(!$(this).is(".bs-material")){if($(this).wrap("<div class=form-control-wrapper></div>"),$(this).after("<span class=material-input></span>"),$(this).hasClass("floating-label")){var a=$(this).attr("placeholder");$(this).attr("placeholder",null).removeClass("floating-label"),$(this).after("<div class=floating-label>"+a+"</div>")}if(($(this).is(":empty")||null===$(this).val()||"undefined"==$(this).val()||""===$(this).val())&&$(this).addClass("empty"),$(this).parent().next().is("[type=file]")){$(this).parent().addClass("fileinput");var b=$(this).parent().next().detach();$(this).after(b)}}})};a();var b=function(){var a,b={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},c=document.createElement("animatefakeelement");for(a in b)if("undefined"!=typeof c.style[a])return b[a];return null}();document.arrive&&document.arrive("input, textarea, select",function(){a()}),$(document).on("change",".checkbox input",function(){var a=$(this).focus();a.find("+ .check").one(b,function(){console.log(b),a.blur()})}),$(document).on("keyup change",".form-control",function(){var a=$(this);setTimeout(function(){""===a.val()?a.addClass("empty"):a.removeClass("empty")},1)}),$(document).on("focus",".form-control-wrapper.fileinput",function(){$(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){$(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var a="";$.each($(this)[0].files,function(b,c){console.log(c),a+=c.name+", "}),a=a.substring(0,a.length-2),a?$(this).prev().removeClass("empty"):$(this).prev().addClass("empty"),$(this).prev().val(a)})});