-
-
Save seyfer/7fbfc1e46090d17c347870ded39a54e1 to your computer and use it in GitHub Desktop.
The simplest feature-detect for flexbox?
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
/* | |
* Trying to feature-detect (very naive) | |
* CSS Flexbox support. | |
* - Only most modern syntax | |
* | |
* Is this nonsense? | |
*/ | |
(function NaiveFlexBoxSupport(d){ | |
var f = "flex", e = d.createElement('b'); | |
e.style.display = f; | |
return e.style.display == f; | |
})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment