Topics

Note Selector

Separating Theme Data

Monday, December 19, 2022

When storing themes, the data is separated and stored in individual theme files inside a theme directory. The data is separated depending on the application it pertains to.

Theme data pertaining to Layers themeables is stored in a specific theme file, *layers.json*. All themes should implement this file.

The layers.json theme file and the application's theme file are combined at runtime.

For community themes, this separation of the data will allow users to only have installed the theme files for the apps they have installed.

Default Theme File Location Separation

Default themes use theme directories identified by resource files. The layers.json and meta.json files of the default themes, Light and Dark, are packaged with Layers. A developer implementing a Layers app will need to produce theme files which implement the default themes in their app. Then, they will need to package the files with their application.