# Docs as Code for Custom CSS

**URL:** https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425
**Category:** Ideas
**Created:** [October 6, 2026, 1:08pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425 "2026-10-06T13:08:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [October 6, 2026, 1:08pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425/1 "2026-10-06T13:08:14Z")

</div>

Currently, various CSS variables need to be reverse-engineered if one wants to tweak the appearance (eg. change the color of some component).

Perhaps it would be nice to build a page where these variables are automatically discovered and explained in the "docs as code" style, or simply use queries or live widgets (or whatever other silverbullet magic) to explain them in a systematic manner.

This way users can appreciate the vast customizabity of SB and its ability to cut through tasks that are often deemed too boring for innovation credits like documenting CSS options.

I got inspired by the theme picker of the Ghostty terminal emulator. Rather than directing the user to a theme gallery, one command triggers a theme preview wizard which shows the themes directly.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [October 6, 2026, 2:55pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425/2 "2026-10-06T14:55:44Z")

</div>

Yeah, no promises, but I'm looking at improving the styling/theming situation in SilverBullet at the moment. I have some ideas. Documenting is definitely part of it, with the caveat that once it's document "it's law" and I cannot change things as easily. I always have told myself that CSS classes are not part of the API and you're on your own if you start hacking it, but maybe it's a time to change this.

---

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [October 6, 2026, 4:27pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425/3 "2026-10-06T16:27:15Z")

</div>

Sure!

Perhaps once SilverBullet's UI starts "opening up" some harmless components, a lot of fun for the user would already have been created

---

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [October 6, 2026, 4:30pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425/4 "2026-10-06T16:30:58Z")

</div>

Are we considering something similar to `Plugs`?

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [October 6, 2026, 4:33pm UTC](https://community.silverbullet.md/t/docs-as-code-for-custom-css/4425/5 "2026-10-06T16:33:37Z")

</div>

No, more likely a few things:

1. Standardizing and documenting CSS selectors
2. I like Lua APIs like the `dom.*` one that can be used to dynamically create HTML structures and feel we can have a Lua API that wraps CSS as well in a similar way.
3. Maybe a more "standardized" way to achieve theming with a nice way to load and switch between them.

Likely all encoded as [SilverBullet libraries](https://docs.silverbullet.md/Library).
