Skip to content

Idea: selector based dark mode support #16

@stereobooster

Description

@stereobooster

Hey 👋 . It's me again. I know I proposed previous version of dark mode #6. But here is one more twist to it.

In case of selector based dark mode (so people can select in the dropdown: dark, light, auto) picture doesn't work. See withastro/starlight#1829

Maybe we can add option for selector based dark mode. Generated HTML can look like this:

<img id="mermaid-dark-0" class="mermaid-dark"  />
<img id="mermaid-0" class="mermaid-light"  />

And CSS for it can look like this:

html[data-theme="light"] .mermaid-dark {
  display: none;
}

html[data-theme="dark"] .mermaid-light {
  display: none;
}

I know this may be too specific request. Up to your consideration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions