Skip to content

Commit

Permalink
Rolled flexbox and flexboxlegacy detects back to original format …
Browse files Browse the repository at this point in the history
…(just using `testAllProps()`)
  • Loading branch information
stucox committed Feb 20, 2013
1 parent 82c9a43 commit a60c727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
11 changes: 2 additions & 9 deletions feature-detects/css/flexbox.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
define(['Modernizr', 'testAllProps', 'nativeCSSDetect'], function( Modernizr, testAllProps, nativeCSSDetect ) {
define(['Modernizr', 'testAllProps'], function( Modernizr, testAllProps ) {
// The *new* flexbox
// dev.w3.org/csswg/css3-flexbox
Modernizr.addTest('flexbox', function () {
var result = nativeCSSDetect('flex-wrap', 'wrap', true);
if (typeof result !== 'undefined') {
return result;
}
// Failing that, do it the old way
return testAllProps('flexWrap');
});
Modernizr.addTest('flexbox', testAllProps('flexWrap'));
});
11 changes: 2 additions & 9 deletions feature-detects/css/flexboxlegacy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
define(['Modernizr', 'testAllProps', 'nativeCSSDetect'], function( Modernizr, testAllProps, nativeCSSDetect ) {
define(['Modernizr', 'testAllProps'], function( Modernizr, testAllProps ) {
// The *old* flexbox
// www.w3.org/TR/2009/WD-css3-flexbox-20090723/
Modernizr.addTest('flexboxlegacy', function () {
var result = nativeCSSDetect('box-direction', 'reverse', true);
if (typeof result !== 'undefined') {
return result;
}
// Failing that, do it the old way
return testAllProps('boxDirection');
});
Modernizr.addTest('flexboxlegacy', testAllProps('boxDirection'));
});

0 comments on commit a60c727

Please sign in to comment.