I have a page like this
+---------+-------------------+
| | +-------+-------+ |
| A | | B | C | |
| | +---------------+ |
+---------+-------------------+
The main and sub containers are declared as flex wrapping elements
.main{
display: flex;
flex-wrap: wrap;
}
.main .sub{
display: flex;
flex-wrap: wrap;
}
When the page get smaller the main element wrap before the sub element
+-------------------+
| |
| A |
| |
+-------------------+
| +-------+-------+ |
| | B | C | |
| +---------------+ |
+-------------------+
But I would like the sub element to wrap before the main to get
+-------------------+----------+
| | +------+ |
| | | B | |
| A | +------+ |
| | | C | |
| | +------+ |
+-------------------+----------+
I would like to change this behaviours to give the wrapping priority to the sub element.