ryanve / res

Device resolution detection module

Home Page:https://www.npmjs.com/package/res

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zoom affects resolution

ryanve opened this issue · comments

devicePixelRatio and @media (resolution) are zoom-relative on desktops but static on phones. res should correlate to the media query behavior. res 0.1 calculates resolution at runtime and its methods returned the cached results. This is problematic because methods may not match the media queries depending on the zoom. We'll have to calculate each time.

0.2.0 is zoom aware.