mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
/*!
|
||
{
|
||
"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 isn’t 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));
|
||
});
|