MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / remToPx

Function remToPx

src/lib/remToPx.ts:1–8  ·  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(window.getComputedStyle(document.documentElement).fontSize)
6
7 return remValue * rootFontSize
8}

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected