# installExplorerTheme

**Kind:** Function

**Source:** [`atloria-monorepo/packages/ui-core/src/components/api-explorer/theme.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/ui-core/src/components/api-explorer/theme.ts#L232)

Put the mode-resolving sheet in the host document, once.

It has to live in the light DOM: only there can a selector see `<html>` and read the
mode off it. Everything the sheet sets is a custom property on the explorer's own
elements, so nothing outside the explorer changes — and from those elements the values
inherit down through every shadow root the explorer opens.

Called from `connectedCallback`, which runs before the first render, so the very first
paint is already themed.

## Signature

```ts
function installExplorerTheme(doc: Document): void
```

## Parameters

| Name | Type |
|---|---|
| `doc` | `Document` |

**Returns:** `void`
