MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / convertRemToPixels

Function convertRemToPixels

frontend/src/ts/utils/numbers.ts:9–11  ·  view source on GitHub ↗
(rem: number)

Source from the content-addressed store, hash-verified

7 * @returns The equivalent value in pixels.
8 */
9export function convertRemToPixels(rem: number): number {
10 return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
11}
12
13/**
14 * Formats a number with spaces for thousands separator.

Callers 4

ui.tsFile · 0.90
updateFontSizeFunction · 0.90
updateWordsInputPositionFunction · 0.90
generateCanvasFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected