From 1cefb058bf14ea83d7c74b343be6d3f745a07083 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 25 May 2025 15:32:12 +0200 Subject: [PATCH] manager: Fix mermaid style on dark Forgejo theme Forgejo seems to automatically choose a light font color for mermaid graphs when the site-theme is dark. This conflicts with the background colors of our mermaid nodes. Explicitly force a dark font color to ensure the text is also readable on dark Forgejo. --- techtree-manager/src/tree.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/techtree-manager/src/tree.rs b/techtree-manager/src/tree.rs index 207515c..cf693cc 100644 --- a/techtree-manager/src/tree.rs +++ b/techtree-manager/src/tree.rs @@ -85,11 +85,11 @@ impl Element { fn mermaid_classes() -> String { r##" - classDef eoi fill:#fff, stroke:#000; + classDef eoi fill:#fff, stroke:#000, color:#000; classDef dependant fill:#fff, stroke:#888, color:#888; - classDef dep_missing fill:#fcc, stroke:#800; - classDef dep_assigned fill:#ffa, stroke:#a50; - classDef dep_completed fill:#afa, stroke:#080; + classDef dep_missing fill:#fcc, stroke:#800, color:#000; + classDef dep_assigned fill:#ffa, stroke:#a50, color:#000; + classDef dep_completed fill:#afa, stroke:#080, color:#000; "## .to_owned() }