Skip to content

lzq4047/postcss-flex-expand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postcss-flex-expland

resolve flexibility cannot calculate flex: 1;

Postcss plugin that explands flex to flex-grow,flex-shrink,flex-basis.

Install

# use npm
npm install --save-dev postcss-flex-expand

or

# use yarn
yarn add --save-dev postcss-flex-expand

Usage

const postcss = require('postcss');
const flexExpand = require('postcss-flex-expand');

postcss([
    flexExpand()
])
/* before */
.flex-item {
    flex: 1;
}

/* after */
.flex-item {
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: auto;
    flex: 1 0 auto;
}

About

Postcss plugin than explands flex to flex-grow,flex-shrink,flex-basis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published