2016-06-04 23:06:59 +03:00
|
|
|
@import "../colors";
|
|
|
|
@import "../globals";
|
|
|
|
@import "../mixins";
|
2015-10-20 22:15:21 +03:00
|
|
|
@import "./config";
|
2015-10-06 20:40:47 +03:00
|
|
|
|
2016-05-22 23:18:41 +03:00
|
|
|
.radio {
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
width: $radio-button-size;
|
|
|
|
height: $radio-button-size;
|
|
|
|
vertical-align: top;
|
|
|
|
cursor: pointer;
|
|
|
|
border: .2 * $unit solid $radio-text-color;
|
|
|
|
border-radius: 50%;
|
|
|
|
&:before {
|
|
|
|
position: absolute;
|
2016-10-02 13:38:45 +03:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2016-05-22 23:18:41 +03:00
|
|
|
content: "";
|
|
|
|
background-color: $radio-inner-color;
|
|
|
|
border-radius: 50%;
|
2016-10-02 13:38:45 +03:00
|
|
|
transition: transform $animation-duration $animation-curve-default;
|
2016-05-22 23:18:41 +03:00
|
|
|
transform: scale(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
.ripple {
|
|
|
|
background-color: $radio-inner-color;
|
|
|
|
opacity: .3;
|
|
|
|
transition-duration: 650ms;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.radioChecked {
|
|
|
|
@extend .radio;
|
|
|
|
border: .2 * $unit solid $radio-inner-color;
|
|
|
|
&:before {
|
2016-10-02 13:38:45 +03:00
|
|
|
transform: scale(0.65);
|
2016-05-22 23:18:41 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-06 20:40:47 +03:00
|
|
|
.field {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
|
|
|
height: $radio-button-size;
|
2015-10-21 03:05:19 +03:00
|
|
|
margin-bottom: $radio-field-margin-bottom;
|
2015-10-06 20:40:47 +03:00
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.text {
|
|
|
|
display: inline-block;
|
|
|
|
padding-left: $unit;
|
2015-10-21 03:05:19 +03:00
|
|
|
font-size: $radio-text-font-size;
|
2015-10-06 20:40:47 +03:00
|
|
|
line-height: $radio-button-size;
|
|
|
|
color: $radio-text-color;
|
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input {
|
|
|
|
position: absolute;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
border: 0;
|
|
|
|
opacity: 0;
|
2015-10-21 03:05:19 +03:00
|
|
|
appearance: none;
|
2015-12-07 03:40:59 +03:00
|
|
|
&:focus ~ .radio {
|
|
|
|
box-shadow: 0 0 0 $unit $radio-focus-color;
|
|
|
|
}
|
2016-05-22 23:18:41 +03:00
|
|
|
&:focus ~ .radioChecked {
|
2015-12-07 03:40:59 +03:00
|
|
|
box-shadow: 0 0 0 $unit $radio-checked-focus-color;
|
2015-10-06 20:40:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.disabled {
|
|
|
|
@extend .field;
|
|
|
|
.text {
|
|
|
|
color: $radio-disabled-color;
|
|
|
|
}
|
|
|
|
.radio {
|
|
|
|
cursor: auto;
|
|
|
|
border-color: $radio-disabled-color;
|
|
|
|
}
|
2016-05-22 23:18:41 +03:00
|
|
|
.radioChecked {
|
2015-10-06 20:40:47 +03:00
|
|
|
cursor: auto;
|
2015-10-06 21:03:46 +03:00
|
|
|
border-color: $radio-disabled-color;
|
|
|
|
&:before {
|
|
|
|
background-color: $radio-disabled-color;
|
|
|
|
}
|
2015-10-06 20:40:47 +03:00
|
|
|
}
|
|
|
|
}
|