Mermaid diagram becomes unreadable in dark mode #35733
Replies: 3 comments 8 replies
-
Turns out this is caused by setting custom background colors and then the auto-adjusted fonts not being readable on those colors anymore. Full diagram here since we'll remove the background colors from the referenced webpage for now as a workaround –
Expected: some way to use colors and specify separate ones for dark mode flowchart LR
classDef ndl fill:#BCEDB1;
classDef ext fill:#B1E1ED;
Editor([Unity Editor]) --> EditorExt([Components + Tools])
EditorExt -- export data --> glTF([glTF + Extensions])
glTF --> Bundler([Bundler - vite])
Runtime([Needle Runtime]) --> Bundler
Three([Three.js]) --> Bundler
YourWebsite([Classic web files - HTML, CSS, JS]) --> Bundler
Bundler -- outputs --> DevPage([web app - dev])
Bundler -- outputs --> DeploymentPage([web app - deploy])
glTF -- compressed with --> gltfTransform([glTF-transform]) --> DeploymentPage
class EditorExt,glTF,Runtime ndl;
class Editor,Three,Bundler,Page,gltfTransform,DeploymentPage,DevPage,YourWebsite ext;
|
Beta Was this translation helpful? Give feedback.
-
With no
flowchart LR
A --> B
However, with
%%{ init : { "theme" : "default" }}%%
flowchart LR
A --> B
This does not change with
%%{ init : { "theme" : "default", "themeVariables" : { "background" : "#000" }}}%%
flowchart LR
A --> B
To handle this, GitHub page should set CSS style |
Beta Was this translation helpful? Give feedback.
-
Hi @marwie - thank you for providing this feedback! We wanted to follow up on this issue. Have the dark theme changes resolved this issue for you? If yes, could you please close out this issue? If not, what additional changes are needed? Thank you! (cc @queenofcorgis) |
Beta Was this translation helpful? Give feedback.
-
The mermaid flowchart becomes unreadable when using github in a dark appearance setting.
Consider the following example
in lightmode text is readable fine
vs in darkmode text becomes unreadable due to low contrast
source page
Beta Was this translation helpful? Give feedback.
All reactions