Skip to content

Commit 49f4cec

Browse files
committed
remove legacyIds and update readme/templates
1 parent 3d1aaec commit 49f4cec

24 files changed

Lines changed: 99 additions & 112 deletions

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Summary
2+
3+
<!-- Briefly describe new themes or changes. -->
4+
5+
## Theme PR checklist
6+
7+
- [ ] `{name}.sable.css` and `{name}.preview.sable.css` share the same basename.
8+
- [ ] Preview file contains **only** the seven preview tokens (see **Creating a new theme** in [README](README.md)), plus `@sable-theme` metadata.
9+
- [ ] `fullThemeUrl` in metadata points at the correct raw URL of the full theme file once merged.

README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,65 @@
1-
# themes
2-
Official Sable Themes Repo
1+
# Sable themes
2+
3+
Official theme packages for [Sable](https://github.com/SableClient/Sable). Each theme ships as:
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. |
9+
10+
`catalog.json` in this repo lists theme pairs for the client (regenerated by CI).
11+
12+
---
13+
14+
## Creating a new theme
15+
16+
### 1. Full theme file: `{basename}.sable.css`
17+
18+
- Define the full set of `--sable-*` / `--tc-*` custom properties your design needs.
19+
- You may use any valid CSS. Sable injects the file as a stylesheet when the theme is applied.
20+
21+
### 2. Preview file: `{basename}.preview.sable.css`
22+
23+
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+
25+
**Include only these properties** and the metadata block in the preview file. The client allowlists exactly these names, anything else is ignored.
26+
27+
| Property | Role in the preview strip |
28+
|----------|---------------------------|
29+
| `--sable-bg-container` | Background of the preview panel |
30+
| `--sable-bg-on-container` | Text on that background |
31+
| `--sable-surface-container` | “Surface” chip background |
32+
| `--sable-surface-container-line` | Panel border |
33+
| `--sable-surface-on-container` | Text on surface chip |
34+
| `--sable-primary-main` | “Primary” chip background |
35+
| `--sable-primary-on-main` | Text on primary chip |
36+
37+
Use a `.sable-theme-preview { ... }` block so the file stays readable; only those lines matter to the parser.
38+
39+
### 3. Metadata block
40+
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).
42+
43+
```
44+
/*
45+
@sable-theme
46+
id: my-theme-id
47+
name: Human Readable Name
48+
author: Your Name
49+
kind: light
50+
contrast: low
51+
tags: comma, separated, keywords
52+
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/my-theme.sable.css
53+
*/
54+
```
55+
56+
- **`kind`**: `light` or `dark`.
57+
- **`contrast`**: `low` or `high`.
58+
- **`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.
61+
62+
### 4. Naming and catalog
63+
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.

accord.preview.sable.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: accord
44
name: Accord
55
author: kr0nst
66
kind: dark
77
contrast: low
88
tags: dark
9-
legacyIds: accord-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/accord.sable.css
1110
*/
1211

@@ -16,12 +15,6 @@ fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/accord.s
1615
--sable-surface-container: #323339;
1716
--sable-surface-container-line: #484a50;
1817
--sable-surface-on-container: #fff;
19-
--sable-surface-var-container: #393a41;
20-
--sable-surface-var-on-container: #f2f2f2;
2118
--sable-primary-main: #5865f2;
2219
--sable-primary-on-main: #fff;
23-
--sable-primary-container: #413c65;
24-
--sable-primary-on-container: #e3e1f7;
25-
--sable-focus-ring: rgba(255, 255, 255, 0.5);
26-
--sable-shadow: rgba(0, 0, 0, 1);
2720
}

accord.sable.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: accord
44
name: Accord
55
author: kr0nst
66
kind: dark
77
contrast: low
88
tags: dark
9-
legacyIds: accord-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/accord.sable.css
1110
*/
1211

black.preview.sable.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: black
44
name: Black
55
author: Elec3137
66
kind: dark
77
contrast: high
88
tags: dark, oled
9-
legacyIds: black-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/black.sable.css
1110
*/
1211

@@ -16,12 +15,6 @@ fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/black.sa
1615
--sable-surface-container: #000000;
1716
--sable-surface-container-line: #702070;
1817
--sable-surface-on-container: #ffffff;
19-
--sable-surface-var-container: #050505;
20-
--sable-surface-var-on-container: #ffffff;
2118
--sable-primary-main: #bdb6ec;
2219
--sable-primary-on-main: #1b1a21;
23-
--sable-primary-container: #2d235c;
24-
--sable-primary-on-container: #e3e1f7;
25-
--sable-focus-ring: rgba(189, 182, 236, 0.5);
26-
--sable-shadow: rgba(0, 0, 0, 0.4);
2720
}

black.sable.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: black
44
name: Black
55
author: Elec3137
66
kind: dark
77
contrast: high
88
tags: dark, oled
9-
legacyIds: black-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/black.sable.css
1110
*/
1211

butter.preview.sable.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: butter
44
name: Butter
55
author: Sable
66
kind: dark
77
contrast: low
88
tags: dark, warm
9-
legacyIds: butter-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/butter.sable.css
1110
*/
1211

@@ -16,12 +15,6 @@ fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/butter.s
1615
--sable-surface-container: #26241f;
1716
--sable-surface-container-line: #4d483d;
1817
--sable-surface-on-container: #fffbde;
19-
--sable-surface-var-container: #12110f;
20-
--sable-surface-var-on-container: #e5e2c8;
2118
--sable-primary-main: #e3ba91;
2219
--sable-primary-on-main: #1a1916;
23-
--sable-primary-container: #453324;
24-
--sable-primary-on-container: #fffbde;
25-
--sable-focus-ring: rgba(227, 186, 145, 0.5);
26-
--sable-shadow: rgba(0, 0, 0, 0.6);
2720
}

butter.sable.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: butter
44
name: Butter
55
author: Sable
66
kind: dark
77
contrast: low
88
tags: dark, warm
9-
legacyIds: butter-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/butter.sable.css
1110
*/
1211

cinny-dark.preview.sable.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: cinny-dark
44
name: Cinny Dark
55
author: Cinny
66
kind: dark
77
contrast: low
88
tags: dark, cinny
9-
legacyIds: cinny-dark-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/cinny-dark.sable.css
1110
*/
1211

@@ -16,12 +15,6 @@ fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/cinny-da
1615
--sable-surface-container: #262626;
1716
--sable-surface-container-line: #4d4d4d;
1817
--sable-surface-on-container: #f2f2f2;
19-
--sable-surface-var-container: #333333;
20-
--sable-surface-var-on-container: #f2f2f2;
2118
--sable-primary-main: #bdb6ec;
2219
--sable-primary-on-main: #2c2843;
23-
--sable-primary-container: #413c65;
24-
--sable-primary-on-container: #e3e1f7;
25-
--sable-focus-ring: rgba(255, 255, 255, 0.5);
26-
--sable-shadow: rgba(0, 0, 0, 1);
2720
}

cinny-dark.sable.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/*
1+
/*
22
@sable-theme
33
id: cinny-dark
44
name: Cinny Dark
55
author: Cinny
66
kind: dark
77
contrast: low
88
tags: dark, cinny
9-
legacyIds: cinny-dark-theme
109
fullThemeUrl: https://raw.githubusercontent.com/SableClient/themes/main/cinny-dark.sable.css
1110
*/
1211

0 commit comments

Comments
 (0)