mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-22 04:00:55 +00:00
Fixing Switch style in up to date firefox
This commit is contained in:
parent
27a33e55e7
commit
d9648152ef
@ -496,24 +496,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.switch input[type="checkbox"] {
|
.switch input[type="checkbox"] {
|
||||||
|
display: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.in {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
-webkit-transition: left 0.05s ease-in-out;
|
left: 12px;
|
||||||
-moz-transition: left 0.05s ease-in-out;
|
-webkit-transition: left 0.08s ease-in-out;
|
||||||
-o-transition: left 0.05s ease-in-out;
|
-moz-transition: left 0.08s ease-in-out;
|
||||||
-ms-transition: left 0.05s ease-in-out;
|
-o-transition: left 0.08s ease-in-out;
|
||||||
transition: left 0.05s ease-in-out;
|
-ms-transition: left 0.08s ease-in-out;
|
||||||
width: 10px;
|
transition: left 0.08s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch.checked input[type="checkbox"] {
|
.switch.checked div {
|
||||||
left: 38px;
|
left: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch input:before {
|
.switch .in:before {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
|
background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
|
||||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #f0f0f0));
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #f0f0f0));
|
||||||
@ -532,7 +539,7 @@
|
|||||||
width: 26px;
|
width: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch input:after {
|
.switch .in:after {
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
background: -moz-linear-gradient(top, #f0f0f0 0%, #fff 100%);
|
background: -moz-linear-gradient(top, #f0f0f0 0%, #fff 100%);
|
||||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f0f0f0), color-stop(100%, #fff));
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f0f0f0), color-stop(100%, #fff));
|
||||||
@ -548,20 +555,6 @@
|
|||||||
width: 12px;
|
width: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch .icon-ok, .switch .icon-remove {
|
|
||||||
line-height: 28px;
|
|
||||||
text-shadow: 0 -2px 0 rgba(0, 0, 0, 0.2);
|
|
||||||
margin: 0 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch .icon-ok {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch .icon-remove {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Material Design Range Slider - by Ravikumar Chauhan
|
Material Design Range Slider - by Ravikumar Chauhan
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
2
examples/gui/data/css/style.min.css
vendored
2
examples/gui/data/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
15
examples/gui/data/js/controls.js
vendored
15
examples/gui/data/js/controls.js
vendored
@ -116,15 +116,14 @@ function start() {
|
|||||||
break;
|
break;
|
||||||
case UI_SWITCHER:
|
case UI_SWITCHER:
|
||||||
var label = "<label id='sl" + data.id + "' class='switch checked'>";
|
var label = "<label id='sl" + data.id + "' class='switch checked'>";
|
||||||
var input = "<input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' checked>";
|
var input = "<div class='in'><input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' checked></div>";
|
||||||
if (data.value == "0") {
|
if (data.value == "0") {
|
||||||
label = "<label id='sl" + data.id + "' class='switch'>";
|
label = "<label id='sl" + data.id + "' class='switch'>";
|
||||||
input = "<input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' >";
|
input = "<div class='in'><input type='checkbox' id='s" + data.id + "' onClick='switcher(" + data.id + ",null)' ></div>";
|
||||||
}
|
}
|
||||||
$('#row').append(
|
$('#row').append(
|
||||||
"<div id='" + data.id + "' class='one columns card tcenter " + colorClass(data.color) + "'><h5>" + data.label + "</h5><hr/>" +
|
"<div id='" + data.id + "' class='one columns card tcenter " + colorClass(data.color) + "'><h5>" + data.label + "</h5><hr/>" +
|
||||||
label + "<i class='icon-ok'></i>" +
|
label + input +
|
||||||
"<i class='icon-remove'></i>" + input +
|
|
||||||
"</label>" +
|
"</label>" +
|
||||||
"</div>");
|
"</div>");
|
||||||
break;
|
break;
|
||||||
@ -226,14 +225,14 @@ function start() {
|
|||||||
"</div>"
|
"</div>"
|
||||||
);
|
);
|
||||||
$('#row').append(
|
$('#row').append(
|
||||||
"<script>" +
|
"<script>" +
|
||||||
"rkmd_rangeSlider('#sl" + data.id + "');" +
|
"rkmd_rangeSlider('#sl" + data.id + "');" +
|
||||||
"</script>"
|
"</script>"
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UPDATE_SLIDER:
|
case UPDATE_SLIDER:
|
||||||
slider_move($('#sl'+data.id), data.value ,'100', false);
|
slider_move($('#sl' + data.id), data.value, '100', false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.error('Unknown type or event');
|
console.error('Unknown type or event');
|
||||||
|
2
examples/gui/data/js/controls.min.js
vendored
2
examples/gui/data/js/controls.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user