A typed code theme. Defaults reproduce today's hardcoded chrome, so a default-constructed theme is
visually unchanged from the pre-theming look.
Many field defaults refer to earlier fields (for example a token color defaults to
codeColor, which in turn defaults to textColor). Lean evaluates defaults at
the moment a theme value is constructed, so on a fresh construction overriding a referenced
field propagates to every later field that defaulted from it. A with update against
an existing theme value freezes the defaults that were already computed there, so a
substantially different theme (a dark variant of a light base, say) needs to set the
dependent fields explicitly.
Constructor
Fields
name : String
A human-readable name for the theme (shown in the picker).
appearance : Theme.Appearance
Whether this theme is intended for a light or a dark display.
description : Option String
An optional one- or two-sentence description shown alongside the theme in the picker. Useful
for noting design intent, palette family, or accessibility trade-offs.
sourceLink : Option Theme.SourceLink
An optional canonical reference for the theme: a URL plus link text shown next to the name
in the picker. Points readers at an upstream homepage or specification when the theme is a
port.
codeFace : Typeface
The font used for code blocks and inline code.
background : Theme.Color
The page and content background color. The contrast reference for body text.
codeBlockBackground : Theme.Color
The background behind code blocks. The contrast reference for token colors.
inlineBackground : Option Theme.Color
The background behind inline code in prose. When set, inline code gets padding and rounding.
structureColor : Theme.Color
The color used for structural decoration (such as case labels).
selectedColor : Theme.Color
The background color used to highlight a selected token in code.
infoColor : Theme.Color
The message-text color for informational diagnostics.
infoIndicatorColor : Theme.Color
The accent color (left border, underline) for informational diagnostics.
warningColor : Theme.Color
The message-text color for warning diagnostics.
warningIndicatorColor : Theme.Color
The accent color (left border, underline) for warning diagnostics.
errorColor : Theme.Color
The message-text color for error diagnostics.
errorIndicatorColor : Theme.Color
The accent color (left border, underline) for error diagnostics.
const : Theme.TokenStyle
Token styling for constants.
keyword : Theme.TokenStyle
Token styling for keywords.
var : Theme.TokenStyle
Token styling for variables (bound names).
literal : Theme.TokenStyle
Token styling for literal tokens.
literalString : Theme.TokenStyle
Token styling for string literals.
literalNumber : Theme.TokenStyle
Token styling for numeric literals.
literalChar : Theme.TokenStyle
Token styling for character literals.
docComment : Theme.TokenStyle
Token styling for docstrings.
comment : Theme.TokenStyle
Token styling for the body text of ordinary comments, both line comments and
block comments.
commentDelim : Theme.TokenStyle
Token styling for comment delimiters — the opener of a line comment and the
/-/-/ openers/closers of a block comment.
sort : Theme.TokenStyle
Token styling for sort formers: Type, Prop, Sort.
levelVar : Theme.TokenStyle
Token styling for universe-level variables (u, v, … in a universe-parameter
context).
levelConst : Theme.TokenStyle
Token styling for universe-level numeric constants (the 3 in Type 3).
levelOp : Theme.TokenStyle
Token styling for universe-level operators (max, imax, +).
moduleName : Theme.TokenStyle
Token styling for module names (e.g. an import target).
delim : Theme.TokenStyle
Token styling for built-in syntactic delimiters such as :=, =>, ←, @,
:, |. CSS class .delim.
operator : Theme.TokenStyle
Token styling for symbolic operator atoms such as +, ::, >>=. CSS class
.punctuation.operator.
bracket : Theme.TokenStyle
Token styling for paired delimiter atoms such as ( ), [ ], {
}, ⟨, ⟩.
separator : Theme.TokenStyle
Token styling for item-separator atoms such as , and ;.
hoverBackground : Theme.Color
The background of hover popups, diagnostic boxes, and tooltips.
hoverBorderColor : Theme.Color
The border color of hover popups and plain tooltips.
hoverText : Theme.Color
The text color inside hover popups.
hoverSeparatorColor : Theme.Color
The separator line color inside hover popups.
tokenHighlightBackground : Theme.Color
The background tint applied to a token on hover (independent of severity).
tacticStateBackground : Theme.Color
The background of a displayed tactic state.
tacticStateBorderColor : Theme.Color
The border color of a displayed tactic state.
highlightOnCode : Theme.Color
An accent background drawn behind highlighted code.
codeColor must read on it.
highlightOnText : Theme.Color
An accent background drawn behind highlighted code or prose. Both code and text must read on it.
uiOnCode : Theme.Color
A neutral UI element color drawn against
codeBlockBackground (e.g. a toggle pill).
extraCss : String → String
Theme-specific CSS appended after the standard variable block. The asset root path the function
receives is relative to verso-themes.css so url() references resolve from there.
assets : Array Theme.ThemeAsset
Non-font assets (such as images) bundled with the theme.