Skip to content

Accept theme names in diagram configuration and CLI flags - #3053

Merged
alixander merged 1 commit into
masterfrom
feat/theme-names
Nov 26, 2026
Merged

alixander merged 1 commit into
masterfrom
feat/theme-names

Conversation

@alixander

Copy link
Copy Markdown
Collaborator

Human


AI

D2 diagrams can use theme-id: Terminal wherever they use theme-id: 300. Both theme config keys accept any name from d2 themes. Matching ignores case and accepts hyphens in place of spaces, so dark-theme-id: Dark Mauve and dark-theme-id: dark-mauve both select 200.

The CLI flags and their environment variables accept the same names. d2 play translates the selected name to the numeric ID used by Playground URLs.

Verified byte-identical SVGs for all 20 catalog names against their numeric IDs, including a paired light/dark rendering. Compiler and CLI regression tests cover substitutions, unknown selections, numeric compatibility, and flag precedence.

  • sent from alixander's Codex

@alixander
alixander marked this pull request as ready for review November 26, 2026 13:08
@alixander
alixander enabled auto-merge November 26, 2026 13:09
@alixander
alixander merged commit 1cea6f0 into master Nov 26, 2026
18 checks passed
@alixander
alixander deleted the feat/theme-names branch November 26, 2026 13:14
alixander added a commit that referenced this pull request Nov 26, 2026
…lies

Master accepts theme names (#3053), unambiguous literals and nested board
names (#3054) and hash-prefixed labels and keyword variable names
(#3056), and publishes D2.js nightlies (#3055). d2compiler/compile.go
imports both master's d2themescatalog and this branch's htmlentity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant