Files
llama.cpp/tools/server/webui/src/lib/utils/css.ts
T

9 lines
271 B
TypeScript
Raw Normal View History

2026-04-28 14:35:49 +03:00
/**
* 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;
}