Skip to content

Instantly share code, notes, and snippets.

@JimmyLv
Last active January 29, 2023 06:58
Show Gist options
  • Save JimmyLv/14864555ca3aa1b633ff3ac801a1eda3 to your computer and use it in GitHub Desktop.
Save JimmyLv/14864555ca3aa1b633ff3ac801a1eda3 to your computer and use it in GitHub Desktop.
Add Zettelkstan number system for Numbered List in Roam Research, It is best to apply this CSS only on the target [[πŸ“ Zettelkasten]] page, via [[roam/css]]
.rm-level-0 {
counter-reset: top-counter;
}
.rm-level-0 > .roam-block-container:before {
counter-increment: top-counter;
content: counter(top-counter);
visibility: hidden;
height: 0;
}
[data-page-title="πŸ“ Zettelkasten"] .rm-block-children:not(.rm-level-0) {
counter-reset: step-counter;
}
[data-page-title="πŸ“ Zettelkasten"] .rm-block-children:not(.rm-level-0) span.rm-bullet__inner--numbered {
visibility: hidden;
display: flex;
}
[data-page-title="πŸ“ Zettelkasten"] .rm-block-children:not(.rm-level-0) span.rm-bullet__inner--numbered:before {
visibility: visible;
counter-increment: step-counter;
content: counter(top-counter) "." counters(step-counter, ".");
}
@JimmyLv
Copy link
Author

JimmyLv commented Dec 26, 2022

Roam Research-Roam Research -  Zettelkasten-001221-20221226

@skyline-123
Copy link

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment