# applyThemeToCSS

Canonical: https://docs.shumoku.dev/en/library/api/applyThemeToCSS
Language: en

@shumoku/core · 0.4.0 · function

# applyThemeToCSS

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/themes/utils.ts#L32)

Apply theme to CSS variables

```
applyThemeToCSS(theme: Theme, root?: HTMLElement): void
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `theme` | `Theme` | No additional description. | `—` |
| `root` | `HTMLElement` | No additional description. | `document.documentElement` |

## Returns

```
void
```

[`libs/@shumoku/core/src/themes/utils.ts:32`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/themes/utils.ts#L32)
