           browsers: browsers
 
 # Flexible Box Layout
-feature require('caniuse-db/features-json/flexbox'), (browsers) ->
-  browsers = map browsers, (browser, name, version) ->
-    if name == 'safari' and version < 6.1
-      browser + ' 2009'
-    else if name == 'ios_saf' and version < 7
-      browser + ' 2009'
-    else if name == 'chrome' and version < 21
-      browser + ' 2009'
-    else if name == 'android' and version < 4.4
-      browser + ' 2009'
-    else
-      browser
-
+flexbox = require('caniuse-db/features-json/flexbox')
+
+feature flexbox, match: /a\sx/, (browsers) ->
+  browsers = browsers.map (i) -> if /ie|firefox/.test(i) then i else "#{i} 2009"
   prefix 'display-flex', 'inline-flex',
           props:  ['display']
           browsers: browsers
-
   prefix 'flex', 'flex-grow', 'flex-shrink', 'flex-basis',
           transition: true
           browsers:   browsers
-
   prefix 'flex-direction', 'flex-wrap', 'flex-flow', 'justify-content',
          'order', 'align-items', 'align-self', 'align-content',
           browsers: browsers
+
+feature flexbox, match: /y\sx/, (browsers) ->
+  prefix 'display-flex', 'inline-flex',
+          props:  ['display']
+          browsers: browsers
+  prefix 'flex', 'flex-grow', 'flex-shrink', 'flex-basis',
+          transition: true
+          browsers:   browsers
+  prefix 'flex-direction', 'flex-wrap', 'flex-flow', 'justify-content',
+         'order', 'align-items', 'align-self', 'align-content',
+          browsers: browsers
+
+require('fs').writeFileSync('2', result.flex.browsers.join('\n'))
 
 # calc() unit
 feature require('caniuse-db/features-json/calc'), (browsers) ->


# Resolution Media Queries
resolution = require('caniuse-db/features-json/css-media-resolution')
feature resolution, match: /( x($| )|a #3)/, (browsers) ->
  prefix '@resolution',
          browsers: browsers

browsers = require('./browsers')

# Sort browsers
sort = (array) ->
  array.sort (a, b) ->
    a = a.split(' ')
    b = b.split(' ')
    if a[0] > b[0]
