This question has been raised many times before but flex model has changed dramatically and I am still unable to find a working solution.
THE PROBLEM
- When the flex direction of an object is set to column, the height of all objects collapse (i.e height:0)
- The problem appears restricted to iProducts. As far as I can tell Flex works as expected in all browsers on desktop and on android.
- The problem is not restricted to Safari as the issue is present on Chrome and Firefox when tested on an iPad (IOS 10.3.3).
This example demonstrates the issue. When width is less than 600px the rows switch to column and the issue will be present.
.InputRow,
.InputItem,
.InputWrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.InputRow,
.InputItem {
-ms-flex-flow: wrap;
flex-flow: wrap;
}
.InputItem,
.InputWrap {
-ms-flex: 1 1 0%;
-webkit-box-flex: 1;
flex: 1 1 0%;
}
.InputWrap {
position: relative;
-ms-flex-pack: end;
-webkit-box-pack: end;
justify-content: flex-end;
-ms-flex-direction: column;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
margin: 0 10px 10px 0;
}
@media all and (max-width:600px) {
.InputRow {
-ms-flex-direction: column;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
-ms-flex-align: stretch;
-webkit-box-align: stretch;
align-items: stretch;
}
}
.Bx {
background: #b00;
border: 5px solid #333;
}
<div class="InputRow">
<div class="InputItem">
<div class="InputWrap">
<div class="Bx">Box 2</div>
</div>
</div>
<div class="InputItem">
<div class="InputWrap">
<div class="Bx">Box 2</div>
</div>
</div>
</div>
<div class="InputRow">
<div class="InputItem">
<div class="InputWrap">
<div class="Bx">ROW 2</div>
</div>
</div>
</div>
This could be an issue with the nesting structure I have setup here but as I said the issue is isolated.