From ef34e3e62ff1fedb5a2105ab13689b681840239d Mon Sep 17 00:00:00 2001 From: zemeolotu Date: Wed, 29 Jan 2020 11:47:32 -0500 Subject: [PATCH] Add better selection styling fallbacks for `@finos/perspective-viewer-hypergrid` --- packages/perspective-viewer-hypergrid/src/js/styles.js | 5 +++-- packages/perspective-viewer/src/themes/material.less | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/perspective-viewer-hypergrid/src/js/styles.js b/packages/perspective-viewer-hypergrid/src/js/styles.js index e93b422204..a4c7684122 100644 --- a/packages/perspective-viewer-hypergrid/src/js/styles.js +++ b/packages/perspective-viewer-hypergrid/src/js/styles.js @@ -18,6 +18,7 @@ properties.add_fonts({ columnHeaderFont: `${title}-header`, columnHeaderForegroundSelectionFont: `${title}-header`, foregroundSelectionFont: `${title}-header`, + treeHeaderForegroundSelectionFont: [`${title}-tree-header-selection`, `${title}-header`], rowHeaderFont: title, treeHeaderFont: title }); @@ -26,8 +27,8 @@ properties.add_styles({ treeHeaderBackgroundColor: `${title}-tree-header--background`, backgroundColor: `${title}--background`, treeHeaderColor: `${title}-tree-header--color`, - treeHeaderForegroundSelectionColor: `${title}-tree-header-selection--color`, - treeHeaderBackgroundSelectionColor: `${title}-tree-header-selection--background`, + treeHeaderForegroundSelectionColor: [`${title}-tree-header-selection--color`, `${title}--color`], + treeHeaderBackgroundSelectionColor: [`${title}-tree-header-selection--background`, `${title}-selection--background`], backgroundSelectionColor: `${title}-selection--background`, foregroundSelectionColor: [`${title}--color`, `color`], borderBottom: `${title}--border-bottom-color`, diff --git a/packages/perspective-viewer/src/themes/material.less b/packages/perspective-viewer/src/themes/material.less index 57df9f9c28..2038a3a9c9 100644 --- a/packages/perspective-viewer/src/themes/material.less +++ b/packages/perspective-viewer/src/themes/material.less @@ -19,6 +19,8 @@ perspective-viewer, .perspective-viewer-material{ --hypergrid-positive--color: #1078d1; --hypergrid-negative--color: #de3838; + + --hypergrid-selection--background: rgba(0, 0, 0, 0.1); } .perspective-viewer-material-base(){ @@ -97,7 +99,5 @@ perspective-viewer, .perspective-viewer-material{ --hypergrid--font-family: "Open Sans"; --hypergrid-header--font-family: "Open Sans"; - --hypergrid-selection--background: rgba(0, 0, 0, 0.1); - --d3fc-treedata-axis--lines: none; } \ No newline at end of file