MCPcopy Create free account
hub / github.com/codeaashu/claude-code / toCSSSize

Function toCSSSize

web/lib/ink-compat/prop-mapping.ts:13–17  ·  view source on GitHub ↗

* Convert an Ink dimension (number = character cells, or `"50%"` percent string) * to a CSS value. We use `ch` for character-width units so the layout * approximates the terminal in a monospace font.

(value: number | string | undefined)

Source from the content-addressed store, hash-verified

11 * approximates the terminal in a monospace font.
12 */
13function toCSSSize(value: number | string | undefined): string | undefined {
14 if (value === undefined) return undefined
15 if (typeof value === 'string') return value // already "50%" etc.
16 return `${value}ch`
17}
18
19// ---------------------------------------------------------------------------
20// Border style mapping

Callers 1

inkBoxPropsToCSSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected