Skip to content

A postcss plugin to transform flex value such as "start" to "flex-start"

Notifications You must be signed in to change notification settings

anc95/postcss-flex-value

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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')
            }
          }
        }]
      }
    ]
  }
}

About

A postcss plugin to transform flex value such as "start" to "flex-start"

Resources

Stars

Watchers

Forks

Packages

No packages published