Last active
January 23, 2017 17:04
-
-
Save IbeVanmeenen/71df3d6215d81f3b3a1c2fd49fca833f to your computer and use it in GitHub Desktop.
Detect Flexbox Wrap support
This file contains hidden or 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
const docStyles = document.documentElement.style; | |
const hasSupport = (('flexWrap' in docStyles) || ('WebkitFlexWrap' in docStyles) || ('msFlexWrap' in docStyles)); | |
if (!hasSupport) { | |
document.body.classList.add('no-flexwrap'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment