Skip to content

[Feature] Support dark mode #75

Open

Description

@Xiaokang2022

When using theme mkdocs-material, the color of markmap doesn't automatically switch with the color mode, making it hard to see the content of markmap in dark mode.

I hope that when switching themes, color of markmap can adjust automatically.

  • light mode:
Image
  • dark mode:
Image

Activity

  1. Xiaokang2022 commented on Jul 23, 2025

    @Xiaokang2022
    Author

    Maybe it's not that markmap doesn't support dark mode, but that there are some bugs? I'm not sure.

    Versions of my pakages:

    • mkdocs: 1.6.1
    • mkdocs-material: 9.6.15
    • mkdocs-markmap: 2.5.2
  2. johnpiers commented on Aug 6, 2026

    @johnpiers

    I see no one ever answered your question. My reply is a year later, hopefully you came right but if not, use this css

    [data-md-color-scheme="slate"] .markmap-foreign,
    [data-md-color-scheme="slate"] .markmap-foreign div {
      color: var(--md-default-fg-color) !important;
    }
    
    [data-md-color-scheme="slate"] .markmap-foreign mark {
      color: #1a1a1a !important;
    }
    

    ps. I quite like your markmap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions