Deck themes
Each folder is a look a deck can be built in. Decks pick themes in their build.py;
the slides themselves don’t change between themes.
| Theme | Look |
|---|---|
paper/ | the Apache Spark Design System: paper and ink, one orange accent, DM Sans and DM Mono |
ide/ | each slide is a file open in an editor: tabs, breadcrumb path, gutter, a vim-style status line, eyebrows as # comments, section dividers as git switch; Monaspace Neon throughout |
Using a theme in a deck
A deck is a folder beside kit/ and themes/ with a slides.py (a list of slide dicts built
with the helpers in kit/deck.py) and a build.py:
from kit import deck
deck.configure(HERE, "ide") # before importing slides: diagrams read the theme's palette
import slides
deck.render(slides.SLIDES, HERE / "ide.html", title="...", repo="my-talk", branch="main")osa-con-2026/, spark-connect-4.2/ and spark-connect-4.2-full/ are working examples; each builds index.html
(paper) and ide.html (ide) from the same slides. A deck’s own sheets go in render(css=[...]);
spark-connect-4.2/deck.css shows one that reads both themes’ tokens. Pages link the theme and kit files by relative path,
so open them from a checkout of this repo.
What a theme holds
theme.py declares:
BASE_CSS: sheets loaded beforekit/deck.css(tokens and components)CSS: sheets loaded after it (overrides)- the diagram palette
kit.deck.Svgdraws with:INK,MUTE,ACC,P2,P3,OK,WARN,FG,LIGHT,SANS,MONO,BOX_SCALEandBOX(fill, stroke, title and sub colour per box kind) - optional hooks, each called as
hook(ctx, i, slide)and returning HTML:chrome(extra markup inside the slide),eyebrow(replaces the eyebrow, orNoneto keep it) andtitle_end(appended to the title)
ctx carries slides, total, logo, logo_alt, repo and branch from render().
To add a theme, copy paper/theme.py into a new folder and change the palette and sheets.
Fonts go in the theme folder with their licences beside them (ide/fonts/ is the pattern).