remove support for flex: 0 since chrome behavior is really weird
This commit is contained in:
@@ -71,9 +71,14 @@ describe('Random layout', function() {
|
||||
randEnum(node, 0.5, 'alignItems', ['flex-start', 'center', 'flex-end', 'stretch']);
|
||||
randEnum(node, 0.5, 'alignSelf', ['flex-start', 'center', 'flex-end', 'stretch']);
|
||||
randEnum(node, 0.5, 'position', ['relative', 'absolute']);
|
||||
//randEnum(node, 0.5, 'flexWrap', ['nowrap', 'wrap']);
|
||||
randEnum(node, 0.5, 'flexWrap', ['nowrap', 'wrap']);
|
||||
//randEnum(node, 0.5, 'measure', [text(texts.small), text(texts.big)]);
|
||||
|
||||
// Chrome is doing some very weird things with this. Probably not worth supporting
|
||||
if (node.style.flex === 0) {
|
||||
delete node.style.flex;
|
||||
}
|
||||
|
||||
if (node.style.measure) {
|
||||
// align-items: stretch on a text node makes it wrap in a different way.
|
||||
// We don't yet support this use case
|
||||
|
@@ -1114,6 +1114,19 @@ describe('Layout', function() {
|
||||
);
|
||||
});
|
||||
|
||||
// This behavior is very weird. The child has a width of 0 but somehow the
|
||||
// parent has a width of 500. Looks like a bug rather than a feature.
|
||||
xit('should layout with flex: 0 and a specific width', function() {
|
||||
testLayout(
|
||||
{style: {flexDirection: 'row'}, children: [
|
||||
{style: {width: 500, flex: 0}}
|
||||
]},
|
||||
{width: 500, height: 0, top: 0, left: 0, children: [
|
||||
{width: 0, height: 0, top: 0, left: 0}
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
||||
xit('should layout with nested padding', function() {
|
||||
testLayout(
|
||||
{style: {}, children: [
|
||||
|
Reference in New Issue
Block a user