observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.16k stars 171 forks source link

1-line bug (--plot-background: white;) #2080

Closed ryancwalsh closed 1 month ago

ryancwalsh commented 1 month ago

Thanks for your amazing library. We're super excited about it!

This line of this commit was a mistake, right?

image

https://github.com/observablehq/plot/commit/4baad4dabc22480845afa5fec00447e442b0b13d#diff-30ab29a77cf3887e9e7e3ec68157a17e77e891ca7d6335074ab995ab1f27b82fR258-R265

I know it was meant to address https://github.com/observablehq/plot/issues/1434.

https://github.com/observablehq/plot/blob/17ed0386ccb3187f34affbd0a4dabeff8bf4bcc3/src/plot.js#L261

I assume what we want is:

  background: var(--plot-background);

Right now, my tooltips look bad when my app is in dark mode (because the --plot-background gets overridden to white for this SVG.

image

If you have any quick tips for how to resolve, I'd appreciate it.

Thanks.