Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid flowChart title can't see clearly in dark mode #7781

Closed
4 tasks done
evan361425 opened this issue Dec 9, 2024 · 2 comments
Closed
4 tasks done

Mermaid flowChart title can't see clearly in dark mode #7781

evan361425 opened this issue Dec 9, 2024 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@evan361425
Copy link

evan361425 commented Dec 9, 2024

Context

Mermaid flowchart title is too dark to see in dark mode.

Bug description

Mermaid allow write title above the flowchart

---
title: Hello World
---
flowchart LR
  user --> website
---
title: Hello World
---
flowchart LR
  user --> website
Loading

But in dark mode, this title will be unclearly to see

image

I tried customize CSS, but as #4582 shows, this is not easy.

Related links

Reproduction

My palette config is

theme:
  palette:
  - media: "(prefers-color-scheme: light)"
    scheme: default
    primary: indigo
    accent: light-blue
  - media: "(prefers-color-scheme: dark)"
    scheme: slate
    primary: blue-grey
    accent: deep orange

and extensions config is

markdown_extensions:
- pymdownx.highlight
- pymdownx.superfences:
    custom_fences:
    - name: mermaid
      class: mermaid
      format: !!python/name:pymdownx.superfences.fence_code_format

Steps to reproduce

  1. Create mermaid codeblock same as above
---
title: Hello World
---
flowchart LR
  user --> website
Loading
  1. Build the site
  2. Toggle to dark mode

I'm not providing .zip file because it has 119 MB and I think it is not valuable for this situation, but I'll provide it if you need it!

Browser

Chrome

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting. First of all, please stick to our bug reporting process – you're making our life easier, and we can help you much faster by providing a mandatory runnable minimal reproduction. For us, looking into issues that do not include runnable reproductions is pure good will, as it takes us more time to investigate.

Fixed in b368cee. Additionally, titles of the other supported diagram types now properly render in dark mode.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Dec 10, 2024
@squidfunk
Copy link
Owner

Released as part of 9.5.49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants