0.0.2 • Published 2 years ago

postcss-flex-value v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

postcss-flex-value

postcss-flex-value is a plugin of postcss, it transforms flex's "start" to "flex-start" to avoid issue like start value has mixed support, consider using flex-start instead

Install

yarn add -D postcss-flex-value

Demo

Input

.a {
  display: flex;
  justify-content: start;
  align-items: end;
}

Output

.a {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

Usage

Postcss

postcss([require('postcss-flex-value')]);

Webpack

module.exports = {
  module: {
    rules: [
      {
        test: /\.(less|css)$/,
        use: [{
          loader: require.resolve('postcss-loader'),
          options: {
            postcssOptions: {
              plugins: require('postcss-flex-value')
            }
          }
        }]
      }
    ]
  }
}