From ffb0cc9c236063fa6771f656d5354cae225f96e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 19 Mar 2026 14:25:03 +0100 Subject: [PATCH 1/4] default colors in box and tree should be ready for dark mode --- src/marks/box.js | 4 ++-- src/transforms/tree.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/marks/box.js b/src/marks/box.js index 27d8fa6ee5..e563d182a4 100644 --- a/src/marks/box.js +++ b/src/marks/box.js @@ -16,7 +16,7 @@ export function boxX( x = identity, y = null, r, - fill = "#ccc", + fill = "color-mix(in srgb, currentColor 20%, var(--plot-background, white))", fillOpacity, stroke = "currentColor", strokeOpacity, @@ -42,7 +42,7 @@ export function boxY( y = identity, x = null, r, - fill = "#ccc", + fill = "color-mix(in srgb, currentColor 20%, var(--plot-background, white))", fillOpacity, stroke = "currentColor", strokeOpacity, diff --git a/src/transforms/tree.js b/src/transforms/tree.js index 2362e19f05..e3a7533e1c 100644 --- a/src/transforms/tree.js +++ b/src/transforms/tree.js @@ -65,7 +65,7 @@ export function treeLink({ path = identity, // the delimited path delimiter, // how the path is separated curve = "bump-x", - stroke = "#555", + stroke = "color-mix(in srgb, currentColor 33%, var(--plot-background, white))", strokeWidth = 1.5, strokeOpacity = 0.5, treeLayout = tree, From 40a373ca475b403c2f7fbd63ac0a5de56eff0d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 19 Mar 2026 17:28:58 +0100 Subject: [PATCH 2/4] tests --- test/output/boxplot.svg | 2 +- test/output/boxplotFacetInterval.svg | 22 +++++++++--------- test/output/boxplotFacetNegativeInterval.svg | 22 +++++++++--------- test/output/diamondsBoxplot.svg | 2 +- test/output/internFacetNaN.svg | 24 ++++++++++---------- test/output/morleyBoxplot.svg | 2 +- test/output/shorthandBoxX.svg | 2 +- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/test/output/boxplot.svg b/test/output/boxplot.svg index 98735925af..ed89769db4 100644 --- a/test/output/boxplot.svg +++ b/test/output/boxplot.svg @@ -36,7 +36,7 @@ - + diff --git a/test/output/boxplotFacetInterval.svg b/test/output/boxplotFacetInterval.svg index 54ebf4aea2..21fd1bafe0 100644 --- a/test/output/boxplotFacetInterval.svg +++ b/test/output/boxplotFacetInterval.svg @@ -117,37 +117,37 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/boxplotFacetNegativeInterval.svg b/test/output/boxplotFacetNegativeInterval.svg index 54ebf4aea2..21fd1bafe0 100644 --- a/test/output/boxplotFacetNegativeInterval.svg +++ b/test/output/boxplotFacetNegativeInterval.svg @@ -117,37 +117,37 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/diamondsBoxplot.svg b/test/output/diamondsBoxplot.svg index 1d3346cfcc..e81f5d51e4 100644 --- a/test/output/diamondsBoxplot.svg +++ b/test/output/diamondsBoxplot.svg @@ -71,7 +71,7 @@ - + diff --git a/test/output/internFacetNaN.svg b/test/output/internFacetNaN.svg index 4f6e4f98cd..27ec1b2a36 100644 --- a/test/output/internFacetNaN.svg +++ b/test/output/internFacetNaN.svg @@ -226,47 +226,47 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/morleyBoxplot.svg b/test/output/morleyBoxplot.svg index 7c99c972aa..2a3e126d72 100644 --- a/test/output/morleyBoxplot.svg +++ b/test/output/morleyBoxplot.svg @@ -73,7 +73,7 @@ - + diff --git a/test/output/shorthandBoxX.svg b/test/output/shorthandBoxX.svg index b1369c9986..336dcf93f4 100644 --- a/test/output/shorthandBoxX.svg +++ b/test/output/shorthandBoxX.svg @@ -30,7 +30,7 @@ - + From 2786a4c69afeeeb4e261f675f19d53cea71bf6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Fri, 20 Mar 2026 12:23:17 +0100 Subject: [PATCH 3/4] remove default white --- src/marks/box.js | 4 ++-- src/transforms/tree.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/marks/box.js b/src/marks/box.js index e563d182a4..49e8d8fb4b 100644 --- a/src/marks/box.js +++ b/src/marks/box.js @@ -16,7 +16,7 @@ export function boxX( x = identity, y = null, r, - fill = "color-mix(in srgb, currentColor 20%, var(--plot-background, white))", + fill = "color-mix(in srgb, currentColor 20%, var(--plot-background))", fillOpacity, stroke = "currentColor", strokeOpacity, @@ -42,7 +42,7 @@ export function boxY( y = identity, x = null, r, - fill = "color-mix(in srgb, currentColor 20%, var(--plot-background, white))", + fill = "color-mix(in srgb, currentColor 20%, var(--plot-background))", fillOpacity, stroke = "currentColor", strokeOpacity, diff --git a/src/transforms/tree.js b/src/transforms/tree.js index e3a7533e1c..6ec9ab6d1d 100644 --- a/src/transforms/tree.js +++ b/src/transforms/tree.js @@ -65,7 +65,7 @@ export function treeLink({ path = identity, // the delimited path delimiter, // how the path is separated curve = "bump-x", - stroke = "color-mix(in srgb, currentColor 33%, var(--plot-background, white))", + stroke = "color-mix(in srgb, currentColor 33%, var(--plot-background))", strokeWidth = 1.5, strokeOpacity = 0.5, treeLayout = tree, From 6ebdf11ad22ef83e211375afe75f29774743e613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Fri, 20 Mar 2026 12:23:59 +0100 Subject: [PATCH 4/4] fix snapshots --- test/output/boxplot.svg | 2 +- test/output/boxplotFacetInterval.svg | 22 +++++++++--------- test/output/boxplotFacetNegativeInterval.svg | 22 +++++++++--------- test/output/diamondsBoxplot.svg | 2 +- test/output/internFacetNaN.svg | 24 ++++++++++---------- test/output/morleyBoxplot.svg | 2 +- test/output/shorthandBoxX.svg | 2 +- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/test/output/boxplot.svg b/test/output/boxplot.svg index ed89769db4..82583737c6 100644 --- a/test/output/boxplot.svg +++ b/test/output/boxplot.svg @@ -36,7 +36,7 @@ - + diff --git a/test/output/boxplotFacetInterval.svg b/test/output/boxplotFacetInterval.svg index 21fd1bafe0..4d2facb2bd 100644 --- a/test/output/boxplotFacetInterval.svg +++ b/test/output/boxplotFacetInterval.svg @@ -117,37 +117,37 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/boxplotFacetNegativeInterval.svg b/test/output/boxplotFacetNegativeInterval.svg index 21fd1bafe0..4d2facb2bd 100644 --- a/test/output/boxplotFacetNegativeInterval.svg +++ b/test/output/boxplotFacetNegativeInterval.svg @@ -117,37 +117,37 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/diamondsBoxplot.svg b/test/output/diamondsBoxplot.svg index e81f5d51e4..6c7339c730 100644 --- a/test/output/diamondsBoxplot.svg +++ b/test/output/diamondsBoxplot.svg @@ -71,7 +71,7 @@ - + diff --git a/test/output/internFacetNaN.svg b/test/output/internFacetNaN.svg index 27ec1b2a36..1945f36682 100644 --- a/test/output/internFacetNaN.svg +++ b/test/output/internFacetNaN.svg @@ -226,47 +226,47 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/test/output/morleyBoxplot.svg b/test/output/morleyBoxplot.svg index 2a3e126d72..08ecc987ef 100644 --- a/test/output/morleyBoxplot.svg +++ b/test/output/morleyBoxplot.svg @@ -73,7 +73,7 @@ - + diff --git a/test/output/shorthandBoxX.svg b/test/output/shorthandBoxX.svg index 336dcf93f4..0da7c3b355 100644 --- a/test/output/shorthandBoxX.svg +++ b/test/output/shorthandBoxX.svg @@ -30,7 +30,7 @@ - +