sdxc

Type to search, or start from one of these:

[ @sdxc/ui/styles ]

outputCaptionText

The muted caption typography shared by every live readout rendered through a native <output> element.

import { outputCaptionText } from "@sdxc/ui/styles";

Usage

text("sm")'s font-size/line-height fallback pair matches the 0.875rem/calc(1.25 / 0.875) caption spec exactly, so composing it directly keeps every <output> readout visually identical.

Signature

outputCaptionText<Node extends Element = Element>(): MixinDescriptor<
	Node,
	[styles: CSSStyles],
	ElementProps
>

Returns a css() mixin ready for a host element's mix prop.

Examples

<output mix={[outputCaptionText(), mix]}>{value}</output>;

Written by Sergio Xalambrí. Follow @sergiodxa for new packages, or sponsor the work.