Skip to content

Commit 1b69982

Browse files
committed
Indent headings: Add variables to control heading level offset (heading and body) (#15)
1 parent 6f0075c commit 1b69982

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Indent headings.scss

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
/* Indent headings v0.3.0
1+
/* Indent headings v0.3.1-dev
22
github.com/zamsyt */
3+
:root {
4+
--heading-indent: 20px;
5+
--heading-offset: -1;
6+
--heading-offset-body: -1;
7+
}
38
:root:root .cm-content > div, .markdown-preview-view > * > div {
4-
margin-left: calc(max(0, var(--heading-level) - 1) * 20px) !important;
9+
margin-left: calc(max(0, var(--heading-level) + var(--heading-offset-body)) * var(--heading-indent)) !important;
10+
}
11+
:root .cm-content > div.HyperMD-header, .markdown-preview-view > * > div:has(> [data-heading]) {
12+
margin-left: calc(max(0, var(--heading-level) + var(--heading-offset)) * var(--heading-indent)) !important;
513
}
614

715
$max-headings: 10;

0 commit comments

Comments
 (0)