kat0012's picture
Parakon runtime: llama.cpp fork with fused 1-bit CUDA/Metal/CPU kernels (part 8)
b7b13c6 verified
Raw History Blame Contribute Delete
271 Bytes
/**
* Converts a rem CSS value to pixels based on the document root font size.
*/
export function remToPx(rem: string): number {
const val = parseFloat(rem);
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
return val * fontSize;
}