function fullWidth(el) {
const style = window.getComputedStyle(el);
return 'width,margin-left,margin-right,padding-left,padding-right'
.split(',')
.reduce((p,c) => p + parseFloat(style[c]), 0)
;
}
if (window.matchMedia("(min-width: 400px)").matches) {
/* the viewport is at least 400 pixels wide */
} else {
/* the viewport is less than 400 pixels wide */
}
@media screen and max-width($width-md) {...}
- напишите первый миксин $breakpoint-md {...}.