rem.js 237 Bytes Edit Raw Blame History 1 2 3 4 5 6 export function resizeRem() { const docEl = document.documentElement const clientWidth = docEl.clientWidth if (!clientWidth) return document.getElementById('screen-container').style.fontSize = 100 * (clientWidth / 1920) + 'px' }