CSS vars to control graph colors (#77)

* css vars to control graph colors

* moved variable positions
This commit is contained in:
Utsob Roy 2023-02-17 21:17:16 +06:00 committed by GitHub
parent 27d71e8ca7
commit 11b837c01a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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 {