You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Official theme packages for [Sable](https://github.com/SableClient/Sable). Each theme ships as:
3
+
Official theme packages for [Sable](https://github.com/SableClient/Sable). This repo is split into two top-level folders:
4
4
5
-
|File|Purpose|
6
-
|------|--------|
7
-
|**`{name}.sable.css`**| Full theme: all tokens, imported at runtime when the user applies the theme. |
8
-
|**`{name}.preview.sable.css`**|**Preview only**: a tiny subset of tokens so the catalog and chat can show a safe swatch without loading full CSS. |
5
+
|Folder|Contents|
6
+
|--------|----------|
7
+
|themes/| Full themes: each basename has `{name}.sable.css` + `{name}.preview.sable.css`. |
8
+
|tweaks/ | Optional overlays: one `{name}.sable.css` per tweak (no preview file). |
9
9
10
-
`catalog.json`in this repo lists theme pairs for the client (regenerated by CI).
10
+
`catalog.json`at the repo root lists **theme pairs** and **tweaks** for the client (regenerated by CI).
11
11
12
12
---
13
13
14
-
## Creating a new theme
14
+
## Tweaks (`tweaks/*.sable.css`)
15
15
16
-
### 1. Full theme file: `{basename}.sable.css`
16
+
Tweaks are **single-file** CSS overlays: they stack on top of whichever full theme is active. There is no `.preview.sable.css`. The app loads the full file once, parses metadata from it, caches the CSS, and shows a text description in the catalog instead of a color swatch.
17
+
18
+
Add one file per tweak under `tweaks/` (e.g. `tweaks/my-tweak.sable.css`).
19
+
20
+
### Metadata: `@sable-tweak`
21
+
22
+
The first block comment containing `@sable-tweak` is parsed:
23
+
24
+
```
25
+
/*
26
+
@sable-tweak
27
+
id: my-tweak
28
+
name: Human Readable Name
29
+
description: One line explaining what changes (shown in the catalog).
30
+
author: Your Name
31
+
tags: comma, separated, keywords
32
+
*/
33
+
```
34
+
35
+
CI will regenerate the catalog.json. Do not modify it.
36
+
37
+
---
38
+
39
+
## Themes (`themes/`)
40
+
41
+
### 1. Full theme file: `themes/{basename}.sable.css`
17
42
18
43
- Define the full set of `--sable-*` / `--tc-*` custom properties your design needs.
19
44
- You may use any valid CSS. Sable injects the file as a stylesheet when the theme is applied.
The in-app **preview card** (settings catalog, favorites, chat embeds) does **not** load this file as a full stylesheet. Sable **parses** it and only applies a limited set of custom properties to a small UI sample (“Sample text”, Primary, Surface chips).
24
49
@@ -38,7 +63,7 @@ Use a `.sable-theme-preview { ... }` block so the file stays readable; only thos
38
63
39
64
### 3. Metadata block
40
65
41
-
Put this **first** in the preview file (and typically mirror the same block in the full `.sable.css` for consistency). The first block comment that contains `@sable-theme` is parsed (you can add a license comment **above** it, or put `@sable-theme` in the first block).
66
+
Put this **first** in the preview file (and mirror the same block in the full `.sable.css`). The first block comment that contains `@sable-theme` is parsed.
-**`fullThemeUrl`**: URL to the full `.sable.css` (used when linking from preview to install).
59
-
60
-
Adjust `fullThemeUrl` to the upstream raw URL once the files are on GitHub, although you'll need to point to your fork or import the raw file for your testing.
83
+
-**`fullThemeUrl`**: Raw URL to the full file under `themes/` (used when linking from preview to install).
61
84
62
-
### 4. Naming and catalog
85
+
Adjust `fullThemeUrl` to match this repo layout: `…/main/themes/{basename}.sable.css` once the files are on `main`.
63
86
64
-
- Basename must match between files: `my-theme.preview.sable.css` pairs with `my-theme.sable.css`.
65
-
- After you add or rename files on `main`, CI will regenerate `catalog.json`. Do not modify it.
87
+
CI will regenerate the catalog.json. Do not modify it.
0 commit comments