The value of 1rem in CSS is can be determined with:
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);