@media screen and (min-width: 700px) {
.body {
background: red;
}
}
const screenWidth = window.screen.width,
screenHeight = window.screen.height;
console.log(`Ширина = ${screenWidth}; Высота = ${screenHeight}`);
// Либо так, тут расчёт будет более верным, так как полоса для прокрутки страницы не учитывается
const clientWidth = document.documentElement.clientWidth,
clientHeight = document.documentElement.clientHeight;
console.log(`Ширина = ${clientWidth}; Высота = ${clientHeight}`);