Looking to switch up the column order in Bootstrap 4's flexbox grid system?
Here's the current code:
<div class="contents">
<div class="row row-1">
<div class="col-sm-6">Content Left</div>
<div class="col-sm-6">Content Right</div>
</div>
<div class="row row-2">
<div class="col-sm-6">Content Right</div>
<div class="col-sm-6">Content Left</div>
</div>
<div class="row row-3">
<div class="col-sm-6">Content Left</div>
<div class="col-sm-6">Content Right</div>
</div>
<div class="row row-4">
<div class="col-sm-6">Content Right</div>
<div class="col-sm-6">Content Left</div>
</div>
</div>
If you want every even row to have its columns' orders reversed, check out this CSS snippet:
.row:nth-child(2n) .col-sm-6:first-child{
float:right;
}
Take a look at the JSFiddle for more: https://jsfiddle.net/bq1L3gax/