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 diagrams rendering to dark in dark mode (8.3.0 regression) #4000

Closed
5 tasks done
mbelangergit opened this issue Jun 6, 2022 · 6 comments
Closed
5 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@mbelangergit
Copy link
Contributor

mbelangergit commented Jun 6, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When upgrading form 8.2.16 to 8.3.2, I noticed that the Mermaid diagrams fonts and colors are not following the theme fonts and colors as before.

With 8.2.16:
image

With 8.3.2:
image

Expected behaviour

The 8.2 behavior is expected.

Actual behaviour

The fonts and colors of diagrams are not consistent with the theme.

Steps to reproduce

  1. Create a new site in 8.3.2
  2. Enable Mermaid diagrams in mkdocs.yml
  3. Add a Mermaid diagram in Markdown
``` mermaid
classDiagram
    class BankAccount
    BankAccount : +String owner
    BankAccount : +Bigdecimal balance
    BankAccount : +deposit(amount)
    BankAccount : +withdrawl(amount)
```

Package versions

  • Python: 3.10.4
  • MkDocs: 1.3.0
  • Material: 8.3.2

Configuration

site_name: My Docs
theme:
  name: material
  palette:
    scheme: slate
    primary: indigo
markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format

System information

  • Operating system: Windows 10
  • Browser: Chrome
@squidfunk squidfunk added the bug Issue reports a bug label Jun 6, 2022
@squidfunk
Copy link
Owner

Thanks for reporting and congratulations on issue #4000! This is very likely a regression that got introduced due to the drop in specificity on the dark mode selectors. I'll look into it asap.

@squidfunk
Copy link
Owner

Fixed in 26010be.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jun 6, 2022
@squidfunk squidfunk changed the title Mermaid diagrams fonts and colors not consistent in 8.3.2 Mermaid diagrams rendering to dark in dark mode (8.3.0 regression) Jun 7, 2022
@squidfunk
Copy link
Owner

The fix was released as part of 8.3.3.

@mbelangergit
Copy link
Contributor Author

Again, a fantastic response time!

Thanks!

@dkadrios
Copy link

dkadrios commented Jan 5, 2024

I'm not sure if this regressed again or if titles specifically were overlooked. It might warrant its own ticket, but I notice that titles still have the default styling when in dark mode, making them difficult to read

@squidfunk
Copy link
Owner

If Mermaid.js changes something upstream, we might need to adapt. Regardless, we're going to need a new issue with a minimal reproduction to investigate. Please also carefully study our bug reporting process.

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

3 participants