Browse Source

Safari needs -webkit- prefix for clip-path

pull/1029/head
Max Prokhorov 5 years ago
committed by Maxim Prokhorov
parent
commit
712cbe4942
2 changed files with 5 additions and 2 deletions
  1. +1
    -0
      code/html/custom.css
  2. +4
    -2
      code/html/custom.js

+ 1
- 0
code/html/custom.css View File

@ -267,6 +267,7 @@ span.slider {
.inner-container:nth-child(2) {
background: #c00000;
color: white;
-webkit-clip-path: inset(0 50% 0 0);
clip-path: inset(0 50% 0 0);
transition: .3s cubic-bezier(0,0,0,1);
}


+ 4
- 2
code/html/custom.js View File

@ -820,10 +820,12 @@ function initCheckboxes() {
var setCheckbox = function(element, value) {
var container = $(".toggle-container", $(element));
if (value) {
container.css("clipPath", "inset(0 0 0 50%)");
container.css("-webkit-clip-path", "inset(0 0 0 50%)");
container.css("clip-path", "inset(0 0 0 50%)");
container.css("backgroundColor", "#00c000");
} else {
container.css("clipPath", "inset(0 50% 0 0)");
container.css("-webkit-clip-path", "inset(0 50% 0 0)");
container.css("clip-path", "inset(0 50% 0 0)");
container.css("backgroundColor", "#c00000");
}
}


Loading…
Cancel
Save