| 86 | /////////////////////////////////////////////////////////// |
| 87 | // Fixing flexbox gap property missing in some Safari versions |
| 88 | function checkFlexGap() { |
| 89 | var flex = document.createElement("div"); |
| 90 | flex.style.display = "flex"; |
| 91 | flex.style.flexDirection = "column"; |
| 92 | flex.style.rowGap = "1px"; |
| 93 | |
| 94 | flex.appendChild(document.createElement("div")); |
| 95 | flex.appendChild(document.createElement("div")); |
| 96 | |
| 97 | document.body.appendChild(flex); |
| 98 | var isSupported = flex.scrollHeight === 1; |
| 99 | flex.parentNode.removeChild(flex); |
| 100 | console.log(isSupported); |
| 101 | |
| 102 | if (!isSupported) document.body.classList.add("no-flexbox-gap"); |
| 103 | } |
| 104 | checkFlexGap(); |
| 105 | |
| 106 | // https://unpkg.com/smoothscroll-polyfill@0.4.4/dist/smoothscroll.min.js |