[fix] 'flex' shorthand sets 'flexBasis' to '0%'

Ref #426
This commit is contained in:
Nicolas Gallagher
2017-06-13 14:12:39 -07:00
parent a61f71133e
commit 88ddeca0c6
3 changed files with 5 additions and 4 deletions

View File

@@ -52,6 +52,7 @@ input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,input::-webkit
.rn-flexShrink-1qe8dj5{-webkit-flex-shrink:0;flex-shrink:0}
.rn-flexShrink-1wbh5a2{-webkit-flex-shrink:1;flex-shrink:1}
.rn-flexBasis-1mlwlqe{-webkit-flex-basis:auto;flex-basis:auto}
.rn-flexBasis-1ro0kt6{-webkit-flex-basis:0%;flex-basis:0%}
.rn-flexDirection-eqz5dr{-webkit-box-direction:normal;-webkit-box-orient:vertical;-webkit-flex-direction:column;flex-direction:column}
.rn-marginTop-1mnahxq{margin-top:0px}
.rn-marginRight-61z16t{margin-right:0px}

View File

@@ -32,14 +32,14 @@ describe('apis/StyleSheet/createReactDOMStyle', () => {
display: 'flex',
flexGrow: 1,
flexShrink: 1,
flexBasis: 'auto'
flexBasis: '0%'
});
expect(createReactDOMStyle({ display: 'flex', flex: 10 })).toEqual({
display: 'flex',
flexGrow: 10,
flexShrink: 1,
flexBasis: 'auto'
flexBasis: '0%'
});
expect(createReactDOMStyle({ display: 'flex', flexShrink: 1 })).toEqual({
@@ -51,7 +51,7 @@ describe('apis/StyleSheet/createReactDOMStyle', () => {
display: 'flex',
flexGrow: 1,
flexShrink: 2,
flexBasis: 'auto'
flexBasis: '0%'
});
});

View File

@@ -155,7 +155,7 @@ const createReducer = (style, styleProps) => {
case 'flex': {
resolvedStyle.flexGrow = value;
resolvedStyle.flexShrink = 1;
resolvedStyle.flexBasis = 'auto';
resolvedStyle.flexBasis = '0%';
break;
}
case 'shadowColor':