add detection for devicePixelRatio