La referencia de la API está disponible solo en inglés por ahora.

themeCss

function
tokens/css.ts:136
signature
themeCss(options): string

The design tokens, as CSS custom properties.

Parameters

options — object with:

NameTypeDescription
rootFontSize?booleanEmit the 62.5% root declaration alongside the variables. false leaves it out, for an application that sets its own root; every --yl-* length is then relative to whatever that is.
scoped?booleanWrap the variables under .yl-root instead of :root, for an application embedding Yoltra components inside a page it does not own.

Returns

string

Example

example
// A server render, inlining the variables before first paint.
<style dangerouslySetInnerHTML={{ __html: themeCss() }} />