Skip to content

Style guide

Unlisted harness for the Cipher design system. Swatch values are read back from the live computed style, so a label can never disagree with what is rendered.

Colour tokens

Surfaces

  • --rv-bg-deep
  • --rv-bg
  • --rv-bg-elevated
  • --rv-bg-selection
  • --rv-bg-selection-alt

Text

  • --rv-text
  • --rv-text-high
  • --rv-text-secondary
  • --rv-muted
  • --rv-dim
  • --rv-comment

Lines

  • --rv-border
  • --rv-border-focused

Accent

  • --rv-accent
  • --rv-accent-hover
  • --rv-on-accent

Semantic

  • --rv-error
  • --rv-error-bright
  • --rv-warning
  • --rv-warning-bright
  • --rv-info
  • --rv-magenta
  • --rv-blue

Diff tints

  • --rv-add-bg
  • --rv-add-gutter
  • --rv-del-bg
  • --rv-del-gutter
  • --rv-hunk-bg

KeyCap

  • --rv-keycap-bg
  • --rv-keycap-border
  • --rv-keycap-bottom-border
  • --rv-keycap-text

Typography

Everything is monospace. Fantasque Sans Mono is primary; JetBrains Mono covers only the glyphs Fantasque lacks, rescaled with size-adjust so a fallback glyph still occupies one cell.

  • h1 Sphinx of black quartz, judge my vow — 0123456789
  • h2 Sphinx of black quartz, judge my vow — 0123456789
  • h3 Sphinx of black quartz, judge my vow — 0123456789
  • h4 Sphinx of black quartz, judge my vow — 0123456789
  • body Sphinx of black quartz, judge my vow — 0123456789
  • sm Sphinx of black quartz, judge my vow — 0123456789
  • xs Sphinx of black quartz, judge my vow — 0123456789

Ligature and feature check (calt on): => != >= <= --> ::= ... ###

RangeSpecimen
Box drawing╭ ╮ ╰ ╯ ─ │ ┼ ┃ ├ ┤ ┬ ┴
Blocks█ ▉ ▊ ▋ ▌ ▍ ▎ ▏ ▀ ▄ ░ ▒ ▓
Fallback (JetBrains)▾ ▸ ◆ ✓ ✗ ← → ↔
Fantasque arrows↑ ↓
Punctuation· • … — © @@ > *

TerminalWindow

Unfocused, with an inlaid title and footer count:

[2] Changes
  ▾ /
>   ● A added.txt
      M modified.go
      D gone.txt
1 of 3

Focused — the border switches to --rv-border-focused:

[0] Diff
changelist: (staged)

Loading diff…

Title only, no index and no count:

Install
$ curl -fsSL https://example.invalid/install.sh | sh

Bare frame, no label at all:

No svn commands run yet.

KeyCap

spacec?[]ctrl+rescshift+tab

HintBar

Bare text, matching the in-app status bar:

spacestagenchangelistccommitrrevert[ ]view?help

With key caps, for docs prose:

spacestagenchangelistccommitrrevert[ ]view?help

DiffBlock

Additions read by background tint and weight, not hue — the same lime as body links, which are underlined. Compare the + rows below with this link.

internal/svn/status.go
--- a/internal/svn/status.go
+++ b/internal/svn/status.go
@@ -12,7 +12,9 @@ func Parse(r io.Reader) ([]Entry, error) {
 	dec := xml.NewDecoder(r)
 	var doc statusXML
-	if err := dec.Decode(&doc); err != nil {
-		return nil, err
+	if err := dec.Decode(&doc); err != nil {
+		return nil, fmt.Errorf("parse status: %w", err)
 	}
 	return doc.Entries(), nil
 }

Code blocks

internal/tui/theme/theme.go
// Cipher is modeled on the "Cipher Dark" VS Code theme.
func Cipher() Theme {
return Theme{
Text: lipgloss.Color("#e6e9f2"),
Accent: lipgloss.Color("#9fef00"),
BorderFocused: lipgloss.Color("#9fef00"),
}
}
Terminal window
# Install the latest release.
curl -fsSL https://raw.githubusercontent.com/bapatchirag/revision/main/install.sh | sh
revision --version
--- a/internal/svn/status.go
+++ b/internal/svn/status.go
@@ -12,7 +12,9 @@ func Parse(r io.Reader) ([]Entry, error) {
dec := xml.NewDecoder(r)
var doc statusXML
- if err := dec.Decode(&doc); err != nil {
- return nil, err
+ if err := dec.Decode(&doc); err != nil {
+ return nil, fmt.Errorf("parse status: %w", err)
}
return doc.Entries(), nil
}

Golden layout

Rendered verbatim from internal/app/testdata/TestModelGoldenLayout.golden. Vertical rules must be unbroken in Safari, Chrome and Firefox — this is where a cell-width mismatch between the primary face and the fallback would show.

╭─ [1] Status ─────────────────╮╭─ [0] Diff ───────────────────────────────────╮
│Root      /home/alice/work/wc ││changelist: (staged)                          │
│Source    /home/alice/work/wc ││                                              │
│CWD       /home/alice/work/wc ││Loading diff…                                 │
│Branch    trunk               ││                                              │
│Revision  r42                 ││                                              │
│HEAD      r50                 ││                                              │
╰──────────────────────────────╯│                                              │
╭─ [2] ─ Changes ─── Changelist╮│                                              │
│  ▾ /                         ││                                              │
│>   ● A added.txt             ││                                              │
│      M modified.go           ││                                              │
│      D gone.txt              ││                                              │
│                              ││                                              │
╰────────────────── 1 of 3 ────╯│                                              │
╭─ [3] Log ────────────────────╮│                                              │
│  Rev   Author Message        │╰──────────────────────────────────────────────╯
│    r50                       │╭─ [4] Command Log ────────────────────────────╮
│  * r42                       ││No svn commands run yet.                      │
│                              ││                                              │
│                              ││                                              │
│                              ││                                              │
╰────────────── 1 of 2 · 1 ────╯╰──────────────────────────────────────────────╯
space stage · n changelist · c commit · r revert · d delete · [ ] view · ? help 

Asides & prose

A block quote in --rv-muted, italic.