How It Works¶
Display-Only CSS Ordering¶
Chrono Sort never reads note contents, renames files, or modifies anything on disk. Instead, it
maintains a single <style id="chrono-sort-styles"> element in Obsidian's document head.
For each eligible folder in the File Explorer, Chrono Sort switches that folder's
.nav-folder-children container to a vertical Flexbox column
(display: flex; flex-direction: column;) and assigns CSS order values targeted by Obsidian's
data-path attributes:
.nav-folder:has(> .nav-folder-title[data-path="Journal/2026/Dec"]) > .nav-folder-children {
display: flex;
flex-direction: column;
}
.nav-folder:has(> .nav-folder-title[data-path="Journal/2026/Dec"]) > .nav-folder-children > .nav-folder {
order: 10000;
}
.nav-folder:has(> .nav-folder-title[data-path="Journal/2026/Dec"]) > .nav-folder-children > .nav-file {
order: 30000;
}
.nav-folder:has(> .nav-folder-title[data-path="Journal/2026/Dec"]) > .nav-folder-children > .nav-file:has(> .nav-file-title[data-path="Journal/2026/Dec/2026-W49.md"]) {
order: 20001;
}
Vault root sorting targets .nav-folder.mod-root > .nav-folder-children.
Grouping & Threshold Safeguards¶
- Folders stay above files: Matching Obsidian's File Explorer layout, subfolders always appear above files.
- Non-date items stay below chronological items: Within each group (folders and files independently), non-date items keep Obsidian's native sort order beneath the chronologically sorted items.
- Two-item minimum: A subfolder group or file group is only reordered if it contains at least two recognized date/period items. This prevents stray names containing a year or month from unintentionally reordering unrelated folders.
Live Updates¶
Chrono Sort listens to Obsidian's create, delete, and rename vault events and coalesces bursts
(such as syncs or folder moves) with a 150 ms debounce. You can also trigger an immediate refresh at
any time via the Refresh chronological sort command in the Command Palette.