Skip to content

Commit e813cc3

Browse files
committed
fix: fullscreen diagram export background color mismatch
Use the same isDark value from Mermaid render time instead of re-checking CSS variables. Fixes white-on-white text when exporting dark-mode diagrams.
1 parent 667d495 commit e813cc3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [0.6.2] - 2026-03-08
4+
5+
### Bug Fixes
6+
- Fixed fullscreen diagram export using wrong background color — now uses the same dark/light mode that was used to render the Mermaid theme
7+
38
## [0.6.1] - 2026-03-08
49

510
### Pi Install Script

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "visual-explainer",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"description": "Agent skill that generates beautiful HTML pages for diagrams, diff reviews, plan reviews, and data tables",
55
"keywords": [
66
"claude-code-plugin",

plugins/visual-explainer/templates/mermaid-flowchart.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,9 @@ <h1 class="animate" style="--i:0">CI/CD Pipeline</h1>
567567
clone.style.width = '';
568568
clone.style.height = '';
569569

570-
const bg = getComputedStyle(document.documentElement)
571-
.getPropertyValue('--bg').trim() || '#ffffff';
570+
// Use the same isDark value that was used to render the Mermaid theme
571+
// This ensures the background matches the baked-in SVG colors
572+
const bg = isDark ? '#042f2e' : '#f0fdfa';
572573

573574
const html = `<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">
574575
<meta name="viewport" content="width=device-width, initial-scale=1.0">

0 commit comments

Comments
 (0)