2015-12-06 06:24:05 +03:00
|
|
|
@mixin radio-color($color, $opacity) {
|
2015-12-07 22:34:46 +03:00
|
|
|
~ .check,
|
|
|
|
~ .radio-decorator {
|
2015-11-25 02:40:52 +03:00
|
|
|
opacity: $opacity;
|
|
|
|
}
|
|
|
|
|
2015-12-07 22:34:46 +03:00
|
|
|
~ .check {
|
2015-11-25 02:40:52 +03:00
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
|
2015-12-07 22:34:46 +03:00
|
|
|
~ .radio-decorator {
|
2015-11-25 02:40:52 +03:00
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-06 06:24:05 +03:00
|
|
|
label.radio,
|
|
|
|
label.radio-inline,
|
|
|
|
.radio label,
|
|
|
|
.radio-inline label {
|
|
|
|
position: relative;
|
2015-12-07 22:34:46 +03:00
|
|
|
padding-left: 45px;
|
2015-12-06 06:24:05 +03:00
|
|
|
color: $mdb-radio-label-color;
|
2015-12-07 22:34:46 +03:00
|
|
|
cursor: pointer;
|
2014-10-03 15:58:24 +04:00
|
|
|
|
2015-12-06 06:24:05 +03:00
|
|
|
span {
|
|
|
|
position: absolute;
|
|
|
|
top: 2px;
|
2015-12-07 22:34:46 +03:00
|
|
|
left: 10px;
|
|
|
|
display: block;
|
2015-12-06 06:24:05 +03:00
|
|
|
transition-duration: 0.2s;
|
|
|
|
}
|
|
|
|
.radio-decorator {
|
|
|
|
width: 15px;
|
2015-12-07 22:34:46 +03:00
|
|
|
height: 15px;
|
|
|
|
border: 2px solid $mdb-radio-color-off;
|
2015-12-06 06:24:05 +03:00
|
|
|
border-radius: 100%;
|
|
|
|
}
|
|
|
|
.check {
|
|
|
|
display: inline-block;
|
|
|
|
width: 15px;
|
2015-12-07 22:34:46 +03:00
|
|
|
height: 15px;
|
2015-12-06 06:24:05 +03:00
|
|
|
background-color: $mdb-radio-color-on;
|
2015-12-07 22:34:46 +03:00
|
|
|
border-radius: 100%;
|
2015-12-06 06:24:05 +03:00
|
|
|
transform: scale3d(0, 0, 0);
|
|
|
|
}
|
2015-12-07 22:34:46 +03:00
|
|
|
.check::after {
|
2015-12-06 06:24:05 +03:00
|
|
|
position: absolute;
|
|
|
|
top: -18px;
|
2015-12-07 22:34:46 +03:00
|
|
|
left: -18px;
|
|
|
|
z-index: 1;
|
|
|
|
display: block;
|
2015-12-06 06:24:05 +03:00
|
|
|
width: 50px;
|
2015-12-07 22:34:46 +03:00
|
|
|
height: 50px;
|
|
|
|
margin: 0;
|
|
|
|
content: "";
|
|
|
|
background-color: $mdb-text-color-primary;
|
2015-12-06 06:24:05 +03:00
|
|
|
border-radius: 100%;
|
|
|
|
opacity: 0;
|
|
|
|
transform: scale3d(1.5, 1.5, 1);
|
|
|
|
}
|
2015-12-07 22:34:46 +03:00
|
|
|
input[type=radio]:not(:checked) ~ .check::after {
|
2015-12-06 06:24:05 +03:00
|
|
|
animation: rippleOff 500ms;
|
|
|
|
}
|
2015-12-07 22:34:46 +03:00
|
|
|
input[type=radio]:checked ~ .check::after {
|
2015-12-06 06:24:05 +03:00
|
|
|
animation: rippleOn 500ms;
|
2015-11-02 23:39:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
input[type=radio] {
|
|
|
|
width: 0;
|
2015-12-07 22:34:46 +03:00
|
|
|
height: 0;
|
2015-11-02 23:39:13 +03:00
|
|
|
overflow: hidden;
|
2015-12-07 22:34:46 +03:00
|
|
|
opacity: 0;
|
2015-11-25 02:40:52 +03:00
|
|
|
|
|
|
|
&:checked {
|
|
|
|
@include radio-color($mdb-radio-color-on, 1);
|
|
|
|
}
|
|
|
|
&:checked ~ .check {
|
|
|
|
transform: scale3d(0.55, 0.55, 1);
|
|
|
|
}
|
2015-11-02 23:39:13 +03:00
|
|
|
}
|
2015-11-25 02:40:52 +03:00
|
|
|
|
|
|
|
input[type=radio][disabled] {
|
|
|
|
|
|
|
|
// light theme spec: Disabled: #000000, Opacity 26%
|
|
|
|
@include radio-color($black, 0.26);
|
|
|
|
|
|
|
|
// dark theme spec: Disabled: #FFFFFF, Opacity 30%
|
|
|
|
.theme-dark & {
|
|
|
|
@include radio-color($white, 0.30);
|
|
|
|
}
|
2015-11-02 23:39:13 +03:00
|
|
|
}
|
2014-10-03 15:58:24 +04:00
|
|
|
}
|
|
|
|
|
2015-12-06 06:24:05 +03:00
|
|
|
|
2014-10-03 15:58:24 +04:00
|
|
|
@keyframes rippleOn {
|
2015-11-02 23:39:13 +03:00
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
opacity: 0.2;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2014-10-03 15:58:24 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes rippleOff {
|
2015-11-02 23:39:13 +03:00
|
|
|
0% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
opacity: 0.2;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2014-10-03 15:58:24 +04:00
|
|
|
}
|