dom.js 197 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 export const calcPx = (px) => { const clientWidth = document.body.clientWidth; let fz; if (clientWidth > 750) { fz = 1; } else { fz = (clientWidth / 750); } return px * fz; };