Split flexGrow to separate plugin

This commit is contained in:
Adam Wathan 2019-02-26 10:30:44 -05:00
parent 7af36e1274
commit 06ef9557b3
6 changed files with 58 additions and 46 deletions

View file

@ -2851,6 +2851,10 @@ table {
flex: none !important;
}
.flex-grow-0 {
flex-grow: 0 !important;
}
.flex-grow {
flex-grow: 1 !important;
}
@ -2859,10 +2863,6 @@ table {
flex-shrink: 1 !important;
}
.flex-grow-0 {
flex-grow: 0 !important;
}
.flex-shrink-0 {
flex-shrink: 0 !important;
}
@ -8536,6 +8536,10 @@ table {
flex: none !important;
}
.sm\:flex-grow-0 {
flex-grow: 0 !important;
}
.sm\:flex-grow {
flex-grow: 1 !important;
}
@ -8544,10 +8548,6 @@ table {
flex-shrink: 1 !important;
}
.sm\:flex-grow-0 {
flex-grow: 0 !important;
}
.sm\:flex-shrink-0 {
flex-shrink: 0 !important;
}
@ -14206,6 +14206,10 @@ table {
flex: none !important;
}
.md\:flex-grow-0 {
flex-grow: 0 !important;
}
.md\:flex-grow {
flex-grow: 1 !important;
}
@ -14214,10 +14218,6 @@ table {
flex-shrink: 1 !important;
}
.md\:flex-grow-0 {
flex-grow: 0 !important;
}
.md\:flex-shrink-0 {
flex-shrink: 0 !important;
}
@ -19876,6 +19876,10 @@ table {
flex: none !important;
}
.lg\:flex-grow-0 {
flex-grow: 0 !important;
}
.lg\:flex-grow {
flex-grow: 1 !important;
}
@ -19884,10 +19888,6 @@ table {
flex-shrink: 1 !important;
}
.lg\:flex-grow-0 {
flex-grow: 0 !important;
}
.lg\:flex-shrink-0 {
flex-shrink: 0 !important;
}
@ -25546,6 +25546,10 @@ table {
flex: none !important;
}
.xl\:flex-grow-0 {
flex-grow: 0 !important;
}
.xl\:flex-grow {
flex-grow: 1 !important;
}
@ -25554,10 +25558,6 @@ table {
flex-shrink: 1 !important;
}
.xl\:flex-grow-0 {
flex-grow: 0 !important;
}
.xl\:flex-shrink-0 {
flex-shrink: 0 !important;
}

View file

@ -2851,6 +2851,10 @@ table {
flex: none;
}
.flex-grow-0 {
flex-grow: 0;
}
.flex-grow {
flex-grow: 1;
}
@ -2859,10 +2863,6 @@ table {
flex-shrink: 1;
}
.flex-grow-0 {
flex-grow: 0;
}
.flex-shrink-0 {
flex-shrink: 0;
}
@ -8536,6 +8536,10 @@ table {
flex: none;
}
.sm\:flex-grow-0 {
flex-grow: 0;
}
.sm\:flex-grow {
flex-grow: 1;
}
@ -8544,10 +8548,6 @@ table {
flex-shrink: 1;
}
.sm\:flex-grow-0 {
flex-grow: 0;
}
.sm\:flex-shrink-0 {
flex-shrink: 0;
}
@ -14206,6 +14206,10 @@ table {
flex: none;
}
.md\:flex-grow-0 {
flex-grow: 0;
}
.md\:flex-grow {
flex-grow: 1;
}
@ -14214,10 +14218,6 @@ table {
flex-shrink: 1;
}
.md\:flex-grow-0 {
flex-grow: 0;
}
.md\:flex-shrink-0 {
flex-shrink: 0;
}
@ -19876,6 +19876,10 @@ table {
flex: none;
}
.lg\:flex-grow-0 {
flex-grow: 0;
}
.lg\:flex-grow {
flex-grow: 1;
}
@ -19884,10 +19888,6 @@ table {
flex-shrink: 1;
}
.lg\:flex-grow-0 {
flex-grow: 0;
}
.lg\:flex-shrink-0 {
flex-shrink: 0;
}
@ -25546,6 +25546,10 @@ table {
flex: none;
}
.xl\:flex-grow-0 {
flex-grow: 0;
}
.xl\:flex-grow {
flex-grow: 1;
}
@ -25554,10 +25558,6 @@ table {
flex-shrink: 1;
}
.xl\:flex-grow-0 {
flex-grow: 0;
}
.xl\:flex-shrink-0 {
flex-shrink: 0;
}

View file

@ -26,6 +26,7 @@ module.exports = {
justifyContent: ['responsive'],
alignContent: ['responsive'],
flex: ['responsive'],
flexGrow: ['responsive'],
flexbox: ['responsive'],
float: ['responsive'],
fontFamily: ['responsive'],

View file

@ -20,6 +20,7 @@ import alignSelf from './plugins/alignSelf'
import justifyContent from './plugins/justifyContent'
import alignContent from './plugins/alignContent'
import flex from './plugins/flex'
import flexGrow from './plugins/flexGrow'
import flexbox from './plugins/flexbox'
import float from './plugins/float'
import fontFamily from './plugins/fontFamily'
@ -101,6 +102,7 @@ export default function(config) {
justifyContent,
alignContent,
flex,
flexGrow,
flexbox,
float,
fontFamily,

15
src/plugins/flexGrow.js Normal file
View file

@ -0,0 +1,15 @@
export default function({ variants }) {
return function({ addUtilities }) {
addUtilities(
{
'.flex-grow-0': {
'flex-grow': '0',
},
'.flex-grow': {
'flex-grow': '1',
},
},
variants
)
}
}

View file

@ -2,15 +2,9 @@ export default function({ variants }) {
return function({ addUtilities }) {
addUtilities(
{
'.flex-grow': {
'flex-grow': '1',
},
'.flex-shrink': {
'flex-shrink': '1',
},
'.flex-grow-0': {
'flex-grow': '0',
},
'.flex-shrink-0': {
'flex-shrink': '0',
},