Skip to content
Ooidget

Ooidget Component Format 0.1Editor's Draft

Styles and design tokens

Styles

A style is a named, shared look for a rectangle: an object with radius and effects, as for a shape. Styles are supplied by a bundle’s styles or by the host. A layer that names a style is drawn as a rect whose radius is the layer’s radius if present, else the style’s, and whose effects are the style’s followed by the layer’s.

A layer naming a style that does not exist is skipped.

Design tokens

A document MAY carry design tokens in the format of the W3C Design Tokens Community Group [DTCG]: groups of tokens, each an object with $value and $type.

Wherever a document accepts a Color, number or string, it MAY instead give a token reference, a string of the form "{group.subgroup.token}" as defined by that format. A runtime MUST resolve references against the bundle’s tokens, then the host’s, following aliases; an unresolved reference is treated as an absent value.

Token sets for light and dark colour schemes are selected by the host; documents do not branch on the scheme except through env.dark.