Pages
Contents
3. Extending Themes
Custom themes are placed in src/themes/my-name.css and discovered automatically.
Example: Creating a Custom Theme
Create the file:
| src/themes/oled.css |
Contents:
| /* src/themes/oled.css β no @import needed, the bundle already includes everything */ |
| html[data-theme="oled"] { |
| --xpulse-bg: #000000; |
| --xpulse-surface: #0a0a0a; |
| --xpulse-surface-strong: #111111; |
| --xpulse-text: #eeeeee; |
| --xpulse-accent: #00ffaa; |
| } |
Then in xpulse.json:
| { |
| "theme": { |
| "default": "dark", |
| "allow": ["dark", "light", "oled"] |
| } |
| } |
Naming Guidelines
- Lowercase only
- Hyphens instead of spaces (
high-contrast,blue-dark) - Short and descriptive
darkandlightare reserved