@media (width)
and @media (height)
values const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0)
const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
window.innerWidth
and window.innerHeight
@media (width)
and @media (height)
which include scrollbarsinitial-scale
and zoom variations may cause mobile values to wrongly scale down to what PPK calls the visual viewport and be smaller than the @media
valuesundefined
in IE8-document.documentElement.clientWidth
and .clientHeight
@media (width)
and @media (height)
when there is no scrollbarjQuery(window).width()
which jQuery calls the browser viewportmatchMedia
to obtain precise dimensions in any unit