mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-07-22 05:59:47 +03:00
adds inline radio support
This commit is contained in:
parent
dff3eec918
commit
6ecac7e5e1
|
@ -3,24 +3,21 @@
|
||||||
& ~ .circle {
|
& ~ .circle {
|
||||||
opacity: @opacity;
|
opacity: @opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
& ~ .check {
|
& ~ .check {
|
||||||
background-color: @color;
|
background-color: @color;
|
||||||
}
|
}
|
||||||
|
|
||||||
& ~ .circle {
|
& ~ .circle {
|
||||||
border-color: @color;
|
border-color: @color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio {
|
.radio label,
|
||||||
label {
|
label.radio-inline {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-left: 45px;
|
padding-left: 45px;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: @mdb-radio-label-color;
|
color: @mdb-radio-label-color;
|
||||||
.mdb-label-color-toggle-focus();
|
.mdb-label-color-toggle-focus();
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -64,12 +61,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.radio,
|
||||||
|
.radio-inline {
|
||||||
input[type=radio] {
|
input[type=radio] {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&:checked {
|
&:checked {
|
||||||
.radio-color(@mdb-radio-color-on, 1);
|
.radio-color(@mdb-radio-color-on, 1);
|
||||||
}
|
}
|
||||||
|
@ -77,12 +75,9 @@
|
||||||
transform: scale3d(0.55, 0.55, 1);
|
transform: scale3d(0.55, 0.55, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=radio][disabled] {
|
input[type=radio][disabled] {
|
||||||
|
|
||||||
// light theme spec: Disabled: #000000, Opacity 26%
|
// light theme spec: Disabled: #000000, Opacity 26%
|
||||||
.radio-color(@black, 0.26);
|
.radio-color(@black, 0.26);
|
||||||
|
|
||||||
// dark theme spec: Disabled: #FFFFFF, Opacity 30%
|
// dark theme spec: Disabled: #FFFFFF, Opacity 30%
|
||||||
.theme-dark & {
|
.theme-dark & {
|
||||||
.radio-color(@white, 0.30);
|
.radio-color(@white, 0.30);
|
||||||
|
@ -92,7 +87,8 @@
|
||||||
|
|
||||||
// Prevent ripple effect on page load
|
// Prevent ripple effect on page load
|
||||||
.is-focused {
|
.is-focused {
|
||||||
.radio {
|
.radio,
|
||||||
|
.radio-inline {
|
||||||
input[type=radio]:checked ~ .check:after {
|
input[type=radio]:checked ~ .check:after {
|
||||||
animation: rippleOn 500ms;
|
animation: rippleOn 500ms;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
"inputElements": "input.form-control, textarea.form-control, select.form-control",
|
"inputElements": "input.form-control, textarea.form-control, select.form-control",
|
||||||
"checkboxElements": ".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]",
|
"checkboxElements": ".checkbox > label > input[type=checkbox], label.checkbox-inline > input[type=checkbox]",
|
||||||
"togglebuttonElements": ".togglebutton > label > input[type=checkbox]",
|
"togglebuttonElements": ".togglebutton > label > input[type=checkbox]",
|
||||||
"radioElements": ".radio > label > input[type=radio]"
|
"radioElements": ".radio > label > input[type=radio],label.radio-inline > input[type=radio]"
|
||||||
},
|
},
|
||||||
"checkbox": function (selector) {
|
"checkbox": function (selector) {
|
||||||
// Add fake-checkbox to material checkboxes
|
// Add fake-checkbox to material checkboxes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user