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

Typogram images fail badly in dark mode #8

Open
tabatkins opened this issue Dec 18, 2023 · 0 comments
Open

Typogram images fail badly in dark mode #8

tabatkins opened this issue Dec 18, 2023 · 0 comments

Comments

@tabatkins
Copy link

Currently, typogram's styles explicitly use black as the fill/stroke for all of its diagram bits. Since it also uses the default transparent bg for its generated <svg> element, this means that a page in dark mode sees black lines on the dark-mode background (generally black as well). You can see this in action at https://fedidcg.github.io/FedCM/#introduction (scroll down a little in the Introduction section). (I just submitted a PR overriding their styles to be darkmode-friendly, so depending on when you read this it's possible they've been fixed already. But you can just generate any diagram yourself and view it on a darkmode page.)

The easiest fix for this is to just change all those instance of black to currentcolor. This'll automatically adapt to the color scheme, and give users of the library a little bit of extra control if they wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant