From 479b609681dfd18e7e07ad0bf8ed4ac60cec63da Mon Sep 17 00:00:00 2001 From: matttdawson <89495499+matttdawson@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:14:58 +1200 Subject: [PATCH] fix: Fix multi themes 2 (#407) * Allow multiple themes * Fix cell selection style --- src/components/Grid.tsx | 1 + src/styles/GridTheme.scss | 14 ++++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/components/Grid.tsx b/src/components/Grid.tsx index ecf599ee..7561e8e0 100644 --- a/src/components/Grid.tsx +++ b/src/components/Grid.tsx @@ -644,6 +644,7 @@ export const Grid = ({ className={clsx( "Grid-container", theme, + "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && params.rowData && autoSized && "Grid-ready", )} diff --git a/src/styles/GridTheme.scss b/src/styles/GridTheme.scss index fc540961..e078213c 100644 --- a/src/styles/GridTheme.scss +++ b/src/styles/GridTheme.scss @@ -8,13 +8,13 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px); @include ag.grid-styles( ( themes: ( - step-compact: ( + 'step-compact.theme-specific': ( extend-theme: alpine, --ag-row-height: 36px, --ag-header-height: 36px, --ag-font-size: calc($grid-base-font-size - 2px), ), - step-default: ( + 'step-default.theme-specific': ( extend-theme: alpine, --ag-row-height: 40px, --ag-header-height: 40px, @@ -47,8 +47,8 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px); ) ); -.ag-theme-step-default, -.ag-theme-step-compact { +.ag-theme-step-default.theme-specific, +.ag-theme-step-compact.theme-specific { .ag-cell[col-id="selection"] { display: flex; // Fix that when you click below checkbox it doesn't process a click } @@ -91,13 +91,7 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px); padding-right: 15px; } - .ag-cell[role="gridcell"] { - border-right: none; - border-left: 1px var(--ag-cell-horizontal-border); - } - .ag-cell[aria-colindex="1"] { - border-left: 1px solid transparent; padding-left: lui.$unit-rg; }