themeCss
functionsignature
themeCss(options): stringThe design tokens, as CSS custom properties.
Parameters
options — object with:
| Name | Type | Description |
|---|---|---|
rootFontSize? | boolean | Emit 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? | boolean | Wrap 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() }} />