# primary-theme/obsidian architecture

> Architecture diagram of the GitHub repository primary-theme/obsidian, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/primary-theme/obsidian
- Repository: https://github.com/primary-theme/obsidian

## Overview

Primary is a visual theme for Obsidian: users apply its CSS to the Obsidian interface, then can adjust exposed design variables or add snippets. Its source is organized around foundations, window chrome, reusable controls, editor styling, core-plugin styling, and community-plugin styling. The README documents palette customization, presets, and snippets, but the source excerpts do not show Sass imports or how the distributed CSS is assembled; the graph therefore avoids claiming those internal links.

Main entry points: [`theme.css`](https://github.com/primary-theme/obsidian/blob/main/theme.css) (Theme CSS), [`src/scss/60_community-plugins/_style-settings-mgmeyers.scss`](https://github.com/primary-theme/obsidian/blob/main/src/scss/60_community-plugins/_style-settings-mgmeyers.scss) (Style Settings), [`snippets/list-style_decimal.css`](https://github.com/primary-theme/obsidian/blob/main/snippets/list-style_decimal.css) (CSS snippets), [`src/scss/10_foundations/palettes/_classic-original.scss`](https://github.com/primary-theme/obsidian/blob/main/src/scss/10_foundations/palettes/_classic-original.scss) (Color palettes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Design foundations"]
  node_typography["Typography and icons"]
  node_palette["Color palettes"]
  node_style["Style Settings"]
end

subgraph group_window["Window chrome"]
  node_windowparts["Window layout"]
end

subgraph group_controls["UI controls"]
  node_components["Common components"]
end

subgraph group_editor["Editor styling"]
  node_editorparts["Editor presentation"]
end

subgraph group_plugins["Plugin styling"]
  node_coreplugins["Core plugin views"]
  node_communityplugins["Community plugin views"]
end

node_user(("Obsidian user"))
node_obsidian["Obsidian interface"]
node_theme["Theme CSS<br/>[theme.css]"]
node_snippets["CSS snippets"]

node_user -->|"uses"| node_obsidian
node_obsidian -->|"uses theme"| node_theme
node_style -.->|"customizes colors"| node_palette
node_snippets -.->|"extends styling"| node_theme

click node_theme "https://github.com/primary-theme/obsidian/blob/main/theme.css"
click node_typography "https://github.com/primary-theme/obsidian/tree/main/src/scss/10_foundations"
click node_palette "https://github.com/primary-theme/obsidian/blob/main/src/scss/10_foundations/palettes/_classic-original.scss"
click node_style "https://github.com/primary-theme/obsidian/blob/main/src/scss/60_community-plugins/_style-settings-mgmeyers.scss"
click node_snippets "https://github.com/primary-theme/obsidian/blob/main/snippets/list-style_decimal.css"
click node_windowparts "https://github.com/primary-theme/obsidian/tree/main/src/scss/20_window"
click node_components "https://github.com/primary-theme/obsidian/tree/main/src/scss/30_components"
click node_editorparts "https://github.com/primary-theme/obsidian/tree/main/src/scss/40_editor"
click node_coreplugins "https://github.com/primary-theme/obsidian/tree/main/src/scss/50_core-plugins"
click node_communityplugins "https://github.com/primary-theme/obsidian/tree/main/src/scss/60_community-plugins"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_typography,node_palette,node_style,node_user toneBlue
class node_windowparts toneAmber
class node_components toneMint
class node_editorparts toneRose
class node_coreplugins,node_communityplugins,node_obsidian toneIndigo
class node_theme,node_snippets toneTeal
```

## Components

### Design foundations

- [Typography and icons](https://github.com/primary-theme/obsidian/tree/main/src/scss/10_foundations): `src/scss/10_foundations`
- [Color palettes](https://github.com/primary-theme/obsidian/blob/main/src/scss/10_foundations/palettes/_classic-original.scss): `src/scss/10_foundations/palettes/_classic-original.scss`
- [Style Settings](https://github.com/primary-theme/obsidian/blob/main/src/scss/60_community-plugins/_style-settings-mgmeyers.scss): `src/scss/60_community-plugins/_style-settings-mgmeyers.scss`

### Window chrome

- [Window layout](https://github.com/primary-theme/obsidian/tree/main/src/scss/20_window): `src/scss/20_window`

### UI controls

- [Common components](https://github.com/primary-theme/obsidian/tree/main/src/scss/30_components): `src/scss/30_components`

### Editor styling

- [Editor presentation](https://github.com/primary-theme/obsidian/tree/main/src/scss/40_editor): `src/scss/40_editor`

### Plugin styling

- [Core plugin views](https://github.com/primary-theme/obsidian/tree/main/src/scss/50_core-plugins): `src/scss/50_core-plugins`
- [Community plugin views](https://github.com/primary-theme/obsidian/tree/main/src/scss/60_community-plugins): `src/scss/60_community-plugins`

### Other components

- **Obsidian user**
- **Obsidian interface**
- [Theme CSS](https://github.com/primary-theme/obsidian/blob/main/theme.css): `theme.css`
- [CSS snippets](https://github.com/primary-theme/obsidian/blob/main/snippets/list-style_decimal.css): `snippets/list-style_decimal.css`

## Connections

- Obsidian user → Obsidian interface: uses (evidence: `README.md`)
- Obsidian interface → Theme CSS: uses theme (evidence: `README.md`)
- Style Settings → Color palettes: customizes colors (evidence: `README.md`)
- CSS snippets → Theme CSS: extends styling (evidence: `README.md`)
