Elkfox/shopify-theme-framework

Uniform clearing for all screen sizes

oscarstranger opened this issue · 0 comments

Currently, the grid doesn't clear properly if all screen widths aren't specifically set on each column.

We should update the grid clearing to work when there are no medium or small widths set, inline with how the grid widths are set .

Eg:

// Uniform Height Clearing
&:nth-child(6n+1).l2 { clear: both; }
&:nth-child(4n+1).l3 { clear: both; }
&:nth-child(3n+1).l4 { clear: both; }
&:nth-child(2n+1).l6 { clear: both; }
@include m() {
  & { clear: none; }
  &:nth-child(6n+1).m2 { clear: both; }
  &:nth-child(4n+1).m3 { clear: both; }
  &:nth-child(3n+1).m4 { clear: both; }
  &:nth-child(2n+1).m6 { clear: both; }
}
@include s() {
  & { clear: none; }
  &:nth-child(6n+1).s2 { clear: both; }
  &:nth-child(4n+1).s3 { clear: both; }
  &:nth-child(3n+1).s4 { clear: both; }
  &:nth-child(2n+1).s6 { clear: both; }
}