I have a problem of how to write a correct sentence reflecting full css @media query with screen size and screen orientation (example bellow) with JS window.matchMedia
, all I can find is a separate example for size (without orientation) and orientation (without size). What is the right syntax of this CSS example:
@media only screen and (min-width: 483px) and (orientation: landscape) {}
in this code:
if (window.matchMedia("(orientation: portrait)").matches) {
// how to add a screen size to this exact code?
}