Media Queries

Media Query Value
min-width*
min-height* or
min-device-width* or
min-device-height* or

* Largest value that matches, ± a bit of error, via binary search.

Units in media queries

When used in media queries:

1rem ~ px

1em ~ px

CSS units in style declarations

When used to style elements:

1rem =

100vw =

User agent

CSSOM

window.innerWidth × window.innerHeight: ×

window.outerWidth × window.outerHeight: ×

window.screen.availWidth × window.screen.availHeight: ×

window.screen.width × window.screen.height: ×