From 712cbe4942b26268c0b26f386753b57462d08f8a Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Thu, 5 Jul 2018 17:42:32 +0300 Subject: [PATCH] Safari needs -webkit- prefix for clip-path --- code/html/custom.css | 1 + code/html/custom.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/html/custom.css b/code/html/custom.css index 80688fc2..62926cf2 100644 --- a/code/html/custom.css +++ b/code/html/custom.css @@ -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); } diff --git a/code/html/custom.js b/code/html/custom.js index 71e1e04e..85d36cfb 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -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"); } }