MCPcopy Create free account
hub / github.com/adobe/react-spectrum / fontRelative

Function fontRelative

packages/@react-spectrum/s2/style/spectrum-theme.ts:416–418  ·  view source on GitHub ↗
(this: MacroContext | void, base: number, baseFontSize = 14)

Source from the content-addressed store, hash-verified

414export type Spacing = PositiveSpacing | NegativeSpacing;
415
416export function fontRelative(this: MacroContext | void, base: number, baseFontSize = 14): string {
417 return base / baseFontSize + 'em';
418}
419
420export function edgeToText(this: MacroContext | void, height: keyof typeof baseSpacing): string {
421 return `calc(${baseSpacing[height]} * 3 / 8)`;

Callers 2

controlFunction · 0.90
spectrum-theme.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected