welsonjs/node_modules/modernizr/feature-detects/css/flexwrap.js

32 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
{
"name": "Flex Line Wrapping",
"property": "flexwrap",
"tags": ["css", "flexbox"],
"notes": [{
"name": "W3C Spec",
"href": "https://www.w3.org/TR/css-flexbox-1/"
}],
"warnings": [
"Does not imply a modern implementation see documentation."
]
}
!*/
/* DOC
Detects support for the `flex-wrap` CSS property, part of Flexbox, which isnt present in all Flexbox implementations (notably Firefox).
This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return `true` for either of these implementations, as long as the `flex-wrap` property is supported. So to ensure the modern syntax is supported, use together with `Modernizr.flexbox`:
```javascript
if (Modernizr.flexbox && Modernizr.flexwrap) {
// Modern Flexbox with `flex-wrap` supported
}
else {
// Either old Flexbox syntax, or `flex-wrap` not supported
}
```
*/
define(['Modernizr', 'testAllProps'], function(Modernizr, testAllProps) {
Modernizr.addTest('flexwrap', testAllProps('flexWrap', 'wrap', true));
});