From 11b837c01a8ca36ccc7b2cfc3e596ac9e334c9b5 Mon Sep 17 00:00:00 2001 From: Utsob Roy Date: Fri, 17 Feb 2023 21:17:16 +0600 Subject: [PATCH] CSS vars to control graph colors (#77) * css vars to control graph colors * moved variable positions --- src/site/_includes/components/graphScript.njk | 4 ++-- src/site/styles/digital-garden-base.scss | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/site/_includes/components/graphScript.njk b/src/site/_includes/components/graphScript.njk index 33072a3..b8a5981 100644 --- a/src/site/_includes/components/graphScript.njk +++ b/src/site/_includes/components/graphScript.njk @@ -56,8 +56,8 @@ height = el.offsetHeight; const highlightNodes = new Set(); let hoverNode = null; - const color = getCssVar("--text-accent"); - const mutedColor = getCssVar("--text-muted"); + const color = getCssVar("--graph-main"); + const mutedColor = getCssVar("--graph-muted"); let Graph = ForceGraph() (el) diff --git a/src/site/styles/digital-garden-base.scss b/src/site/styles/digital-garden-base.scss index 7453756..95bee68 100644 --- a/src/site/styles/digital-garden-base.scss +++ b/src/site/styles/digital-garden-base.scss @@ -9,6 +9,8 @@ body { --note-icon-2: url(/img/tree-2.svg); --note-icon-3: url(/img/tree-3.svg); --note-icon-fallback: url(/img/default-note-icon.svg); + --graph-main: var(--text-accent); + --graph-muted: var(--text-muted); } .content {