-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23f0386
commit 10de6bc
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/////////////////////////////////////////////////////////// | ||
// Fixing flexbox gap property missing in some Safari versions | ||
function checkFlexGap() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
var flex = document.createElement("div"); | ||
flex.style.display = "flex"; | ||
flex.style.flexDirection = "column"; | ||
flex.style.rowGap = "1px"; | ||
|
||
flex.appendChild(document.createElement("div")); | ||
flex.appendChild(document.createElement("div")); | ||
|
||
document.body.appendChild(flex); | ||
var isSupported = flex.scrollHeight === 1; | ||
flex.parentNode.removeChild(flex); | ||
console.log(isSupported); | ||
|
||
if (!isSupported) document.body.classList.add("no-flexbox-gap"); | ||
} | ||
checkFlexGap(); | ||
|
||
// https://unpkg.com/[email protected]/dist/smoothscroll.min.js | ||
|
||
/* | ||
.no-flexbox-gap .main-nav-list li:not(:last-child) { | ||
margin-right: 4.8rem; | ||
} | ||
.no-flexbox-gap .list-item:not(:last-child) { | ||
margin-bottom: 1.6rem; | ||
} | ||
.no-flexbox-gap .list-icon:not(:last-child) { | ||
margin-right: 1.6rem; | ||
} | ||
.no-flexbox-gap .delivered-faces { | ||
margin-right: 1.6rem; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
.no-flexbox-gap .meal-attribute:not(:last-child) { | ||
margin-bottom: 2rem; | ||
} | ||
.no-flexbox-gap .meal-icon { | ||
margin-right: 1.6rem; | ||
} | ||
.no-flexbox-gap .footer-row div:not(:last-child) { | ||
margin-right: 6.4rem; | ||
} | ||
.no-flexbox-gap .social-links li:not(:last-child) { | ||
margin-right: 2.4rem; | ||
} | ||
.no-flexbox-gap .footer-nav li:not(:last-child) { | ||
margin-bottom: 2.4rem; | ||
} | ||
@media (max-width: 75em) { | ||
.no-flexbox-gap .main-nav-list li:not(:last-child) { | ||
margin-right: 3.2rem; | ||
} | ||
} | ||
@media (max-width: 59em) { | ||
.no-flexbox-gap .main-nav-list li:not(:last-child) { | ||
margin-right: 0; | ||
margin-bottom: 4.8rem; | ||
} | ||
} | ||
*/ |
print hello world