| <!DOCTYPE html> |
| <html> |
| <style> |
| .flexbox { |
| display: flex; |
| background-color: #aaa; |
| position: relative; |
| flex-wrap: wrap; |
| flex-direction: column; |
| float: left; |
| align-content: flex-start; |
| } |
| .flexbox > * { |
| flex: none; |
| } |
| .flexbox :nth-child(1) { |
| background-color: lightblue; |
| } |
| .flexbox :nth-child(2) { |
| background-color: lightgreen; |
| } |
| .flexbox :nth-child(3) { |
| background-color: pink; |
| } |
| .flexbox :nth-child(4) { |
| background-color: yellow; |
| } |
| </style> |
| <body> |
| <p>Test to make sure that multiline column flexboxes shrink-to-fit properly.</p> |
| |
| <div class="flexbox"> |
| <div style="width: 100px; height: 20px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 20px"></div> |
| </div> |
| <p style="clear:left">The grey background should be 100px wide.</p> |
| |
| <div class="flexbox" style="height: 30px"> |
| <div style="width: 100px; height: 20px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 20px"></div> |
| </div> |
| <p style="clear:left">The grey background should be 100px wide.</p> |
| |
| <div style="width: 150px"> |
| <div class="flexbox"> |
| <div style="width: 100px; height: 20px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 20px"></div> |
| </div> |
| </div> |
| <p style="clear:left">The grey background should be 100px wide.</p> |
| |
| <div style="width: 150px"> |
| <div class="flexbox" style="height: 35px"> |
| <div style="width: 100px; height: 20px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 10px"></div> |
| <div style="width: 100px; height: 20px"></div> |
| </div> |
| </div> |
| <p style="clear:left">The grey background should be 100px wide and 5px should |
| stick out the bottom.</p> |
| |
| </body> |
| </html> |