MCPcopy
hub / github.com/tw-in-js/twind / em

Function em

packages/preset-typography/src/index.ts:785–787  ·  view source on GitHub ↗
(px: number, base: number)

Source from the content-addressed store, hash-verified

783}
784
785function em(px: number, base: number) {
786 return `${(px / base).toFixed(3).replace(/^0|\.?0+$/g, '')}em`
787}

Callers 1

presetTypographyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected