6. Thou shalt always write rules mobile first (avoid max-width)
For any responsive work, we want to embrace a mobile-first mentality in our styles. Therefore, the properties and values within the root of a rule should be the properties that apply to the smallest viewports (e.g. mobile). We then use media queries to override or add to these styles as and when needed.
Consider this:
.med-Video { position: relative; background-color: $color-black; font-size: $text13; line-height: $text15; /* At medium sizes we want to bump the text up */ @media (min-width: $M) { font-size: $text15; line-height: $text18; } /* Text and line height changes again at larger viewports */ @media (min-width: $L) { font-size: $text18; line-height: 1; } }
That would yield this CSS:
.med-Video { position: relative; background-color: #000; font-size: 13px; line-height: 15px; } @media (min-width: 768px) { .med-Video { font-size: 15px...