From 178ea6ba0c2121ed0eaa9ab0fabe60234ba77650 Mon Sep 17 00:00:00 2001 From: Tom Longhurst <30480171+thomhurst@users.noreply.github.com> Date: Fri, 31 Jul 2026 18:17:04 +0100 Subject: [PATCH] fix(docs): restore Mermaid label contrast Dark-mode paragraph styling overrides Mermaid node colors, making labels on pastel nodes unreadable. Refs #6530 --- docs/docs/writing-tests/lifecycle.md | 2 +- docs/src/css/custom.css | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/docs/writing-tests/lifecycle.md b/docs/docs/writing-tests/lifecycle.md index 18fb3386519..4176ab843cc 100644 --- a/docs/docs/writing-tests/lifecycle.md +++ b/docs/docs/writing-tests/lifecycle.md @@ -54,7 +54,7 @@ flowchart TB T0 --> T0a --> T0b --> T1 --> T2 --> T3 --> T4 --> T5 --> T6 --> T7 - style T0b fill:#fff3e0,stroke:#ef6c00,color:#e65100 + style T0b fill:#fff3e0,stroke:#ef6c00,color:#9a3412 style T3 fill:#c8e6c9,stroke:#2e7d32,color:#1b5e20 style T6 fill:#ffcdd2,stroke:#c62828,color:#b71c1c ``` diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 912280f65d8..56475b2229e 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -93,6 +93,12 @@ body { color: var(--text-body); } +/* Mermaid assigns node text colours on a parent element. Keep labels inheriting + those colours instead of applying the global dark-mode paragraph colour. */ +[data-theme='dark'] .docusaurus-mermaid-container .nodeLabel p { + color: inherit; +} + /* Better code block contrast */ [data-theme='dark'] code { background: rgba(20, 184, 166, 0.15) !important;