From a60c7278ebb9193883f6a66275e532d2978bd095 Mon Sep 17 00:00:00 2001 From: Stu Cox Date: Wed, 20 Feb 2013 10:01:21 +0000 Subject: [PATCH] Rolled `flexbox` and `flexboxlegacy` detects back to original format (just using `testAllProps()`) --- feature-detects/css/flexbox.js | 11 ++--------- feature-detects/css/flexboxlegacy.js | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/feature-detects/css/flexbox.js b/feature-detects/css/flexbox.js index 072185292b..f7283549c1 100644 --- a/feature-detects/css/flexbox.js +++ b/feature-detects/css/flexbox.js @@ -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')); }); diff --git a/feature-detects/css/flexboxlegacy.js b/feature-detects/css/flexboxlegacy.js index af3e52f3b6..4846d5bc32 100644 --- a/feature-detects/css/flexboxlegacy.js +++ b/feature-detects/css/flexboxlegacy.js @@ -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')); });