Make radio buttons look nicer, inline with checkboxes

This commit is contained in:
netniV committed 2018-11-12 16:27:23 +00:00
1 parent 233cfcb201
commit db80db6d0b
8 files changed
+404 -35

No files matched your search

+81
View File
@@ -2364,3 +2364,84 @@ input:checked + .checkboxSlider:before {
.center {
text-align: center;
}
.radioSwitch {
position: relative;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
vertical-align: middle;
}
.radioSwitch input {
/* display:none; */
}
.radioSlider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 24px;
width: 24px;
background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
-webkit-transition: .4s;
transition: .4s;
}
.radioSlider:before {
display: none;
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
background-image: url('./images/cacti_logo.svg');
background-repeat: no-repeat;
background-size: 7px;
background-position: center; /*left 5px;*/
-webkit-transition: .4s;
transition: .4s;
}
input:disabled + .radioSlider {
cursor: not-allowed;
}
input:checked + .radioSlider {
background: #31442b url("images/ui-bg_highlight-hard_20_31442b_1x100.png") repeat-x scroll 50% 50%;
}
input:focus + .radioSlider {
box-shadow: -moz-linear-gradient(top, #45484d 100%, #000000 100%); /* FF3.6+ */
box-shadow: -webkit-linear-gradient(top, #45484d 100%,#000000 100%); /* Chrome10+,Safari5.1+ */
box-shadow: -o-linear-gradient(top, #45484d 100%,#000000 100%); /* Opera 11.10+ */
box-shadow: -ms-linear-gradient(top, #45484d 100%,#000000 100%); /* IE10+ */
}
input:checked + .radioSlider:before {
display: block;
}
/* Rounded.radioSliders */
.radioSlider.radioRound {
border-radius: 24px;
}
.radioSlider.radioRound:before {
border-radius: 50%;
}
.radioLabelWanted {
display: inline-block;
margin-left: 5px;
margin-right: 10px;
vertical-align: middle;
}
-1
View File
@@ -10,7 +10,6 @@ function themeReady() {
$('#navigation').css('height', ($(window).height()-80)+'px');
$('#navigation_right').css('height', ($(window).height()-80)+'px');
$('.formItemDescription').hide();
$('input[type="radio"]').button();
keepWindowSize();
+79
View File
@@ -2491,3 +2491,82 @@ input:checked + .checkboxSlider:before {
.center {
text-align: center;
}
.radioSwitch {
position: relative;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
vertical-align: middle;
}
.radioSwitch input {
/* display:none; */
}
.radioSlider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 24px;
width: 24px;
background-color: rgba(98,125,77,1);
-webkit-transition: .4s;
transition: .4s;
}
.radioSlider:before {
display: none;
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
background-image: url('./images/cacti_logo.svg');
background-repeat: no-repeat;
background-size: 7px;
background-position: center; /*left 5px;*/
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .radioSlider {
background-color: rgba(167,217,134,1);
}
input:checked + .radioSlider:before {
display: inline-block;
}
input:disabled + .radioSlider {
cursor: not-allowed;
}
input:focus + .radioSlider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .radioSlider:before {
display: block;
}
/* Rounded.radioSliders */
.radioSlider.radioRound {
border-radius: 24px;
}
.radioSlider.radioRound:before {
border-radius: 50%;
}
.radioLabelWanted {
display: inline-block;
margin-left: 5px;
margin-right: 10px;
vertical-align: middle;
}
-1
View File
@@ -9,7 +9,6 @@ function themeReady() {
$('body').css('height', $(window).height());
$('#navigation').css('height', ($(window).height()-40)+'px');
$('#navigation_right').css('height', ($(window).height()-40)+'px');
$('input[type="radio"]').button();
keepWindowSize();
+75
View File
@@ -2389,3 +2389,78 @@ input:checked + .checkboxSlider:before {
.center {
text-align: center;
}
.radioSwitch {
position: relative;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
vertical-align: middle;
}
.radioSwitch input {
/* display:none; */
}
.radioSlider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 24px;
height: 24px;
background-color: #aaa;
-webkit-transition: .4s;
transition: .4s;
}
.radioSlider:before {
display: none;
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
background-image: url('./images/cacti_logo.svg');
background-repeat: no-repeat;
background-size: 7px;
background-position: center; /*left 5px;*/
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .radioSlider {
background-color: #3a3b3c;
}
input:disabled + .radioSlider {
cursor: not-allowed;
}
input:focus + .radioSlider {
box-shadow: 0 0 1px #3a3b3c;
}
input:checked + .radioSlider:before {
display: inline-block;
}
/* Rounded.radioSliders */
.radioSlider.radioRound {
border-radius: 24px;
}
.radioSlider.radioRound:before {
border-radius: 50%;
}
.radioLabelWanted {
display: inline-block;
margin-left: 5px;
margin-right: 10px;
vertical-align: middle;
}
+75
View File
@@ -2183,3 +2183,78 @@ input:checked + .checkboxSlider:before {
.center {
text-align: center;
}
.radioSwitch {
position: relative;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
vertical-align: middle;
}
.radioSwitch input {
/* display:none; */
}
.radioSlider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 24px;
width: 24px;
background-color: rgba(0, 0, 0, 0.55);
-webkit-transition: .4s;
transition: .4s;
}
.radioSlider:before {
display:none;
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
background-image: url('./images/cacti_logo.svg');
background-repeat: no-repeat;
background-size: 7px;
background-position: center; /*left 5px;*/
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .radioSlider {
background-color: rgba(0,0,0,0.9);
}
input:disabled + .radioSlider {
cursor: not-allowed;
}
input:focus + .radioSlider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .radioSlider:before {
display: block;
}
/* Rounded.radioSliders */
.radioSlider.radioRound {
border-radius: 24px;
}
.radioSlider.radioRound:before {
border-radius: 50%;
}
.radioLabelWanted {
display: inline-block;
margin-left: 5px;
margin-right: 10px;
vertical-align: middle;
}
+86 -31
View File
@@ -125,9 +125,6 @@ input, select {
}
input[type="checkbox"]:not([name^="multiselect"]),
input[type="radio"]:not([name^="reindex"]) {
display: none;
}
label {
cursor: pointer;
@@ -161,34 +158,6 @@ input[type="checkbox"]:checked + label:before {
}
input[type="checkbox"]:checked + label,
input[type="radio"]:not([name^="reindex"]):checked + label {
color: #FFFFFF;
}
input[type="radio"]:not([name^="reindex"]) + label:before {
border: 1px solid #7f83a2;
border-radius: 10px;
content: "\00a0";
display: inline-block;
font: 10px/1em sans-serif;
height: 12px;
margin: .25em .25em 0 0;
vertical-align:text-bottom;
width: 12px;
background: transparent;
}
input[type="radio"]:not([name^="reindex"]):checked + label:before {
background: #FFFFFF;
box-shadow: 0 0 0 3px #3C8A3C inset;
border: 1px solid #7f83a2;
text-align: center;
font-weight: bold;
}
input[type="radio"]:not([name^="reindex"]) + label.ui-state-hover:before {
border: 1px solid #FFFFFF;
}
label {
white-space:nowrap;
@@ -2559,3 +2528,89 @@ input:checked + .checkboxSlider:before {
.center {
text-align: center;
}
.radioSwitch {
position: relative;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
vertical-align: middle;
}
.radioSwitch input {
/* display:none; */
}
.radioSlider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 24px;
height: 24px;
background-color: #FFAA00;
-webkit-transition: .4s;
transition: .4s;
border: 1px solid #7f83a2;
background-image: -webkit-radial-gradient(50% 50%, ellipse cover, #000000 1%, #04335b 35%, #000000 65%);
background-image: -moz-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: -o-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: -ms-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
}
.radioSlider:before {
display: none;
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
background-image: url('./images/cacti_logo.svg');
background-repeat: no-repeat;
background-size: 7px;
background-position: center; /*left 5px;*/
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .radioSlider {
background-image: -webkit-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: -moz-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: -o-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: -ms-radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
background-image: radial-gradient(50% 50%, ellipse cover, #ffa254 1%, #04335b 35%, #000000 65%);
}
input:focus + .radioSlider {
box-shadow: 0 0 1px #2196F3;
}
input:disabled + .radioSlider {
cursor: not-allowed;
}
input:checked + .radioSlider:before {
display: block;
}
/* Rounded.radioSliders */
.radioSlider.radioRound {
border-radius: 24px;
}
.radioSlider.radioRound:before {
border-radius: 50%;
}
.radioLabelWanted {
display: inline-block;
margin-left: 5px;
margin-right: 10px;
vertical-align: middle;
}