# StyleLayer

<pre class="nacara-api__signature"><code><span class="tok-keyword">type</span> <span class="tok-type">StyleLayer</span> <span class="tok-operator">=</span>
    <span class="tok-punctuation">{</span>
        <a class="tok-property" href="#name">Name</a><span class="tok-punctuation">:</span> <span class="tok-type">string</span>
        <a class="tok-property" href="#css">Css</a><span class="tok-punctuation">:</span> <span class="tok-type">string</span>
    <span class="tok-punctuation">}</span></code></pre>

| | |
|---|---|
| Assembly | `Partas.Nacara.Theme.Contracts` |

One named part of a theme's stylesheet.

Each part is written into a cascade layer of its own, `nacara.<name>`, in the order
the parts are listed. A layer can be replaced, dropped, or added beside the theme's own, which
is how a plugin styles a theme rather than fighting it: a stylesheet that declares
`@layer nacara, mine;` wins over every rule the theme writes, whatever its specificity.

## Fields

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

What the layer is called, which is also the name of its cascade layer.

Lowercase and dotless - `components` becomes `nacara.components`.


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

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

The rules, as they would be written in a stylesheet.


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