MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / remToPx

Function remToPx

apps/baseai.dev/src/lib/remToPx.ts:1–10  ·  view source on GitHub ↗
(remValue: number)

Source from the content-addressed store, hash-verified

1export function remToPx(remValue: number) {
2 let rootFontSize =
3 typeof window === 'undefined'
4 ? 16
5 : parseFloat(
6 window.getComputedStyle(document.documentElement).fontSize
7 );
8
9 return remValue * rootFontSize;
10}

Callers 4

checkVisibleSectionsFunction · 0.90
VisibleSectionHighlightFunction · 0.90
ActivePageMarkerFunction · 0.90
HeadingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected