# ThemeLayers

<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-keyword">module</span> <span class="tok-type">ThemeLayers</span></code></pre>

| | |
|---|---|
| Assembly | `Partas.Nacara.Theme.Contracts` |
| Attributes | `[<RequireQualifiedAccess>]` |

The cascade layers the theme of this build declares, for a plugin that has to order its own
against them.

A CSS tool cannot ask the theme directly without depending on it, and a plugin cannot read what
the theme contributed to the registry unless it was registered after the theme - which the
theme cannot require, since it reads what plugins offered and so must come last itself. This
is written once while the theme configures itself and read when a stylesheet is bundled, by
which time every plugin has configured.





One build at a time, in one process. A host building two sites at once would see them share
this.

## Functions and values

<div class="nacara-api__entry" id="current">
<a class="nacara-api__anchor"
                           href="#current"
                           aria-label="Link to current"
                           data-pagefind-ignore></a>
<details class="nacara-api__member">
<summary>
<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-function">current</span> <span class="tok-punctuation">()</span> <span class="tok-punctuation">:</span> <span class="tok-type">string</span> <span class="tok-type">list</span></code></pre>
</summary>
<div class="nacara-api__body">

What the theme declared, or nothing if no theme did.

Read it when bundling rather than when configuring: a plugin registered before the theme
would otherwise see the empty list.


</div>
</details>
</div>

<div class="nacara-api__entry" id="declare">
<a class="nacara-api__anchor"
                           href="#declare"
                           aria-label="Link to declare"
                           data-pagefind-ignore></a>
<details class="nacara-api__member">
<summary>
<pre class="nacara-api__signature nacara-api__signature--hanging"><code><span class="tok-function">declare</span> <span class="tok-punctuation">(</span><span class="tok-parameter">names</span><span class="tok-punctuation">:</span> <span class="tok-type">string</span> <span class="tok-type">list</span><span class="tok-punctuation">)</span> <span class="tok-punctuation">:</span> <span class="tok-type">unit</span></code></pre>
</summary>
<div class="nacara-api__body">

The theme says what its layers are called, in cascade order.

| Parameter | |
|---|---|
| `names` | Their full names - `nacara.tokens`, `nacara.base`. |


</div>
</details>
</div>
