plot icon indicating copy to clipboard operation
plot copied to clipboard

Dark mode

Open Fil opened this issue 4 years ago • 1 comments

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.

Fil avatar May 18 '21 10:05 Fil

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

Fil avatar May 18 '21 10:05 Fil

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.

mbostock avatar May 07 '23 16:05 mbostock

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

Fil avatar May 08 '23 23:05 Fil