From 5b5211800fe476b0aff436a93fa9f0709a5d4b32 Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Tue, 20 Sep 2022 09:10:54 +0900 Subject: [PATCH] Add a few styles needed for timeline --- src/webviews/apps/plus/graph/GraphWrapper.tsx | 2 ++ src/webviews/apps/shared/theme.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index 82b5e6c..b112c98 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -48,6 +48,8 @@ const getStyleProps = ( cssVariables: { '--app__bg0': computedStyle.getPropertyValue('--color-background'), '--panel__bg0': computedStyle.getPropertyValue('--graph-panel-bg'), + '--panel__bg1': computedStyle.getPropertyValue('--graph-panel-bg2'), + '--section-border': computedStyle.getPropertyValue('--graph-panel-bg2'), '--text-selected': computedStyle.getPropertyValue('--color-foreground'), '--text-normal': computedStyle.getPropertyValue('--color-foreground--85'), '--text-secondary': computedStyle.getPropertyValue('--color-foreground--65'), diff --git a/src/webviews/apps/shared/theme.ts b/src/webviews/apps/shared/theme.ts index 9dfe8ce..c7bb1f5 100644 --- a/src/webviews/apps/shared/theme.ts +++ b/src/webviews/apps/shared/theme.ts @@ -103,6 +103,10 @@ export function initializeAndWatchThemeColors(callback?: () => void) { '--graph-panel-bg', isLightTheme ? darken(backgroundColor, 5) : lighten(backgroundColor, 5), ); + bodyStyle.setProperty( + '--graph-panel-bg2', + isLightTheme ? darken(backgroundColor, 10) : lighten(backgroundColor, 10), + ); bodyStyle.setProperty('--graph-theme-opacity-factor', isLightTheme ? '0.5' : '1'); // alert colors