Skip to content

Dark mode #408

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

Closed
Fil opened this issue May 18, 2021 · 3 comments
Closed

Dark mode #408

Fil opened this issue May 18, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to docs

Comments

@Fil
Copy link
Contributor

Fil commented May 18, 2021

Dark mode almost works: the use of currentColor for stroke and fill is solving 90% of the problem.

In some cases, though, it's not ideal:

  • in cars-parcoords we use white to detach the text against the background. Using "fill: currentColor; filter: invert(1)" would work.
  • in metroUnemploymentRidgeline the areas are filled with #ccc, which could be replaced by "fill: currentColor; filter: invert(20%);"
  • and more.

Adding support for the filter attribute would help a lot.

See also #1461

@Fil Fil self-assigned this May 18, 2021
Fil added a commit that referenced this issue May 18, 2021
this allows generic operations with css filters, in particular for dark mode (#408)
@Fil
Copy link
Contributor Author

Fil commented May 18, 2021

A smaller issue is that hard-coded .plot background {#fff}, which I had to override in bf7b99f

@mbostock mbostock added the enhancement New feature or request label Aug 12, 2021
@mbostock
Copy link
Member

mbostock commented May 7, 2023

We support dark mode in our documentation and I even tweeted about it:

https://twitter.com/mbostock/status/1653069773645938689

Maybe we can close this issue? Maybe the last remaining issues are the default white background #1434 and the default white marker stroke #1463 but both issues can be worked around with a stylesheet.

@Fil Fil added documentation Improvements or additions to docs and removed enhancement New feature or request labels May 8, 2023
@Fil
Copy link
Contributor Author

Fil commented May 8, 2023

At some point we'll have to consolidate the documentation, but in terms of support I think we have all we need.

@Fil Fil closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to docs
Projects
None yet
Development

No branches or pull requests

2 participants