/* eslint-disable flowtype/require-valid-file-annotation */
/* eslint-disable flowtype/require-parameter-type */

'use strict'

const Path = require('path')
const Autoprefixer = require('autoprefixer')
const PreCSS = require('precss')
const Calc = require('postcss-calc')
const variables = require('../config/variables')

// Get context at startup
const mixinsFiles = Path.join(__dirname, '../src/styles/mixins', '*.css')


module.exports = function postcss () {

  return [
    PreCSS({
      variables: {
        variables,
      },
      mixins: {
        mixinsFiles,
      },
    }),
    Calc(),
    Autoprefixer,
  ]

}

/* eslint-disable flowtype/require-valid-file-annotation */
/* eslint-disable flowtype/require-parameter-type */

'use strict'

const Path = require('path')
const Autoprefixer = require('autoprefixer')
const PreCSS = require('precss')
const Calc = require('postcss-calc')
const variables = require('../config/variables')

// Get context at startup
const mixinsFiles = Path.join(__dirname, '../src/styles/mixins', '*.css')


module.exports = function postcss () {

  return [
    PreCSS({
      variables: {
        variables,
      },
      mixins: {
        mixinsFiles,
      },
    }),
    Calc(),
    Autoprefixer({
      browsers: [
        'not ie <= 10',
        'not ie_mob <= 10',
      ],
      flexbox: 'no-2009',
    }),
  ]

}

Disable autoprefixing IE < 11 and flexbox 2009
Disable autoprefixing IE < 11 and flexbox 2009
