Variables
All variables used by the components are listed on this page, alongside with a default config if you are not using Starlight.
Below is a short example on how you can override these variables:
Graph Container
General Colors
--slsg-color-accent
: The base color of an accented element. Inherited by node and link hover colors.--slsg-color-muted
: The base color of a muted element. Inherited by muted node and link colors.--slsg-text-color
: The base color of the text in the graph. Inherited by label colors.--slsg-text-color-accent
: The accent color of the text in the graph. Inherited by label hover colors.
Container
--slsg-graph-width
: The width of the graph container.--slsg-graph-height
: The height of the graph container.--slsg-graph-minimized-bg-color
: The background color of the graph when it is minimized.--slsg-graph-maximized-bg-color
: The background color of the graph when it is fullscreen.--slsg-graph-outline-color
: The color of the graph’s outline.
Actions
--slsg-graph-action-color
: The color of the graph action icons.--slsg-graph-action-color-hover
: The color of the graph action icons when hovered.--slsg-graph-action-bg-color-hover
: The color of the graph action icons when active.
Context Menu
--slsg-context-menu-border-color
: The background color of the context menu.--slsg-context-menu-bg-color
: The color of the context menu text.--slsg-context-menu-bg-color-hover
: The color of the context menu text when hovered.
Graph Elements
Nodes
--slsg-node-color
: The base color of the nodes in the graph.
--slsg-node-color-hover
: The node’s color when hovered. Inherits from--slsg-color-accent
.--slsg-node-color-adjacent
: The node’s color when they are adjacent to the hovered node.--slsg-node-color-muted
: The node’s color when they are not adjacent or hovered. Inherits from--slsg-color-muted
.
--slsg-node-color-current
: The node’s color when it is the same as the current page.--slsg-node-color-visited
: The node’s color when the user has visited the page.--slsg-node-color-unresolved
: The node’s color when the page does not exist.--slsg-node-color-external
: The node’s color when the node leads to an external page.--slsg-node-color-tag
: The node’s color when the node is a tag.
--slsg-node-color-1
: The node’s color when it hasnodeColor1
set in its style.--slsg-node-color-2
: The node’s color when it hasnodeColor2
set in its style.--slsg-node-color-3
: The node’s color when it hasnodeColor3
set in its style.--slsg-node-color-4
: The node’s color when it hasnodeColor4
set in its style.--slsg-node-color-5
: The node’s color when it hasnodeColor5
set in its style.--slsg-node-color-6
: The node’s color when it hasnodeColor6
set in its style.--slsg-node-color-7
: The node’s color when it hasnodeColor7
set in its style.--slsg-node-color-8
: The node’s color when it hasnodeColor8
set in its style.--slsg-node-color-9
: The node’s color when it hasnodeColor9
set in its style.
Links
--slsg-link-color
: The color of the links in the graph.--slsg-link-color-hover
: The color of the links when hovered. Inherits from--slsg-color-accent
.--slsg-link-color-muted
: The color of the links when they are not next to the hovered node. Inherits from--slsg-color-muted
.
Labels
--slsg-label-color
: The color of the labels in the graph. Inherits from--slsg-text-color
.--slsg-label-color-hover
: The color of the labels when hovered. Inherits from--slsg-text-color-accent
.--slsg-label-color-muted
: The color of the labels when they are not next to the hovered node. Inherits from--slsg-text-color
.
Default Config
If you want to a sensible default configuration for a regular light/dark themed Astro website, you can make use of the following CSS variables: