---
url: /api/formats/css/src/functions/scopedThemeCss.md
---
[pantoken-root](../../../../index.md) / [formats/css/src](../index.md) / scopedThemeCss

# Function: scopedThemeCss()

> **scopedThemeCss**(`theme`, `options?`): `string`

Beta

One theme's complete token set, scoped to any element carrying `data-pantoken-theme="<theme>"` or
the equivalent `.--pantoken-theme-<theme>` class.

Every token is emitted as a declaration — including the concrete ones that would normally become
`@property` initial-values — because an initial-value is document-global and cannot vary per scope.

## Parameters

### theme

[`Theme`](../../../../packages/core/src/type-aliases/Theme.md)

### options?

[`ScopedCssOptions`](../interfaces/ScopedCssOptions.md) = `{}`

## Returns

`string`
