Skip to content

StyleLayer

type StyleLayer =
    {
        Name: string
        Css: string
    }
AssemblyPartas.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

Name: string

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

Lowercase and dotless - components becomes nacara.components.

Css: string

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