Skip to content

Feature Request: Adaptive marble diagram #39

Description

@demensky

I figured out how to conveniently generate diagrams for https://rxjs.dev/. I realized that I need to somehow make it possible to switch light and dark versions of diagrams. At first I thought that this can be done through <source media="(prefers-color-scheme: dark)">:

<picture>
  <source srcset="https://via.placeholder.com/300.png/000000/ffffff?text=Dark" media="(prefers-color-scheme: dark)">
  <img src="https://via.placeholder.com/300.png/ffffff/000000?text=Light">
</picture>

But then I realized that I would have to significantly intervene in the generation of html and it would hardly do without dirty hacks.

Then I thought about the article "Building an adaptive favicon" and decided to try to do the same with the diagram (try switch light/dark in the system):

skipUntil-mixed

@timdp, how do you like the idea to give the ability to generate both light and dark versions of the diagram in one file?

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions