mdb-ui-kit/less/_radios.less

125 lines
2.4 KiB
Plaintext
Raw Normal View History

2014-08-18 18:25:33 +04:00
.form-horizontal .radio {
2015-03-09 20:01:22 +03:00
margin-bottom: 10px;
2014-08-18 18:25:33 +04:00
}
.form-group-radio-variant(@placeholder-font-size, @line-height){
.radio {
// Label is set in _inputs.less
}
}
.form-group {
// default label size/location
.form-group-radio-variant(@mdb-input-font-size-base, @mdb-input-line-height-base);
// sm label size/location
&.form-group-sm {
.form-group-radio-variant(@mdb-input-font-size-small, @mdb-input-line-height-small);
}
// lg label size/location
&.form-group-lg {
.form-group-radio-variant(@mdb-input-font-size-large, @mdb-input-line-height-large);
}
}
2014-08-18 18:25:33 +04:00
.radio {
2015-03-09 20:01:22 +03:00
label {
cursor: pointer;
padding-left: 45px;
position: relative;
color: @mdb-radio-label-color;
2015-03-09 20:01:22 +03:00
span {
display: block;
position: absolute;
left: 10px;
top: 2px;
transition-duration: 0.2s;
2014-08-18 18:25:33 +04:00
}
2015-03-09 20:01:22 +03:00
.circle {
border: 2px solid @mdb-radio-border-color;
2015-03-09 20:01:22 +03:00
height: 15px;
width: 15px;
border-radius: 100%;
2014-08-18 18:25:33 +04:00
}
2015-03-09 20:01:22 +03:00
.check {
height: 15px;
width: 15px;
border-radius: 100%;
background-color: @mdb-radio-default;
transform: scale3d(0, 0, 0);
2015-03-09 20:01:22 +03:00
}
.check:after {
display: block;
position: absolute;
content: "";
background-color: @lightbg-text;
left: -18px;
top: -18px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
opacity: 0;
margin: 0;
transform: scale3d(1.5, 1.5, 1);
}
2015-03-09 20:01:22 +03:00
input[type=radio]:not(:checked) ~ .check:after {
animation: rippleOff 500ms;
2014-08-18 18:25:33 +04:00
}
2015-03-09 20:01:22 +03:00
input[type=radio]:checked ~ .check:after {
animation: rippleOn 500ms;
2014-08-18 18:25:33 +04:00
}
2015-03-09 20:01:22 +03:00
}
.variations(~" input[type=radio]:checked ~ .check", background-color, @mdb-radio-default);
.variations(~" input[type=radio]:checked ~ .circle", border-color, @mdb-radio-default);
2015-03-09 20:01:22 +03:00
input[type=radio][disabled] ~ .check,
input[type=radio][disabled] ~ .circle {
opacity: 0.5;
}
input[type=radio] {
opacity: 0;
height: 0;
width: 0;
overflow: hidden;
2015-03-09 22:56:57 +03:00
}
input[type=radio]:checked ~ .check {
transform: scale3d(0.55, 0.55, 1);
2015-03-09 22:56:57 +03:00
}
input[type=radio][disabled] ~ .circle {
border-color: @lightbg-text;
}
input[type=radio][disabled] ~ .check {
background-color: @lightbg-text;
}
2014-08-18 18:25:33 +04:00
}
2014-09-23 11:56:56 +04:00
2014-10-02 13:36:05 +04:00
@keyframes rippleOn {
2015-03-09 20:01:22 +03:00
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
2014-09-23 11:56:56 +04:00
}
2014-10-02 13:36:05 +04:00
@keyframes rippleOff {
2015-03-09 20:01:22 +03:00
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
2014-10-02 13:36:05 +04:00
}