Repository navigation
修复 Mermaid 在自定义主题下的线条与文字对比度 - #77
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当主题标记为深色、对话背景实际为浅粉色时,Mermaid 的浅色生命线与文字几乎不可见。现在按每张图所在区域的实际背景选择高对比默认配色,并在颜色变量、背景设置及背景过渡动画结束后重新检查和重绘。
保留原尺寸、透明无外框、横向滚动、复制、预览和导出。补充半透明背景合成、配色切换、过期异步结果及动画结束后的回归测试;共用现有任务栏徽标的对比度算法。
验证:
pnpm test、pnpm build、openspec validate fix-mermaid-theme-contrast --strict、git diff --check origin/master均通过。OpenSpec:fix-mermaid-theme-contrast。真实生产构建在 Chrome 中验证五种图表及超宽图表,125%/150% DPI、390px 窄窗口、背景切换和放大预览通过。截图保存在本地可视化目录
mermaid-theme-contrast.png,对应的实测记录: