From 1dc41f662c13b2fc43917f3f74677459f46e3d7d Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Thu, 5 Jul 2018 17:42:32 +0300 Subject: [PATCH] Safari switches and clip-path Resolve #1028 Safari only supports clip-path with `-webkit-` prefix: https://caniuse.com/#search=clip-path I assume `clipPath` === `clip-path`, [docs only mention css property with dash and svg elem without](https://developer.mozilla.org/ru/docs/Web/CSS/clip-path) --- code/html/custom.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/html/custom.js b/code/html/custom.js index 71e1e04eee..31253acb71 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("clip-path", "inset(0 0 0 50%)"); + container.css("-webkit-clip-path", "inset(0 0 0 50%)"); container.css("backgroundColor", "#00c000"); } else { - container.css("clipPath", "inset(0 50% 0 0)"); + container.css("clip-path", "inset(0 50% 0 0)"); + container.css("-webkit-clipPath", "inset(0 50% 0 0)"); container.css("backgroundColor", "#c00000"); } }