mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-03 00:50:22 -06:00
9 lines
231 B
TypeScript
9 lines
231 B
TypeScript
export const remToPx = (remValue: number) => {
|
|
let rootFontSize =
|
|
typeof window === "undefined"
|
|
? 16
|
|
: parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
|
|
return remValue * rootFontSize;
|
|
};
|