As the flexbox responsive system had been introduced a couple of years ago and we are still missing some key properties to change conditionally, I needed to add some CSS. For repeating groups, what is very frustrating is that there is no way to dynamically change from not fixed rows to fixed rows.
For example, if on a desktop you want the rg to have as many rows as needed, you would set the number of rows to not fixed number, but if on mobile you want a fixed number of rows, there is no way to conditionally change from not fixed number of rows to a fixed number of rows.
The code below is not perfect and needs to be tweaked for your design but it is the base for how to change the number of rows and columns
<style>
#rg-change-rows {
grid-template-rows: repeat(3, minmax(max-content, auto)) !important;
grid-template-columns: repeat(1, minmax(0px, 1fr)) !important;
}
</style>
For my specific use case I wanted to let the desktop have not fixed rows and on mobile fixed rows…using the below CSS worked for me to change when on mobile. I do this by conditionally adding to the RG and ID attribute for mobile. Each layout is different so you may need to tweak things.
<style>
#rg-change-rows {
overflow: auto !important;
gap: 60px !important;
grid-template-rows: repeat(1, minmax(max-content, auto)) !important;
grid-auto-columns: minmax(max-content, 1fr) !important;
grid-auto-flow: column !important;
border-radius: 0px !important;
opacity: 1 !important;
align-self: center !important;
min-width: 0px !important;
max-width: 1200px !important;
order: 12 !important;
min-height: 0px !important;
height: max-content !important;
flex-grow: 0 !important;
flex-shrink: 0 !important;
width: calc(100% - 0px) !important;
margin: 0px !important;
z-index: 14 !important;
}
</style>
Notice the Gap setting in the CSS on the RG…this is necessary because if you do not include it and you have on the elements inside of the RG a margin, the margin is not applied on the first set of elements. What this means is if your normal RG has 4 items on a row, and has 3 rows, and you apply the CSS to create 1 row, the first 4 elements will not have any margins applied, while the remaining cells elements will have the margin. So, make your Gap be the margin you want between elements and conditionally remove the margin from the elements within the RG, since the gap and margin are applied to elements after first 4 in this example.






