Created
August 30, 2022 16:11
-
-
Save pmbauer/7395acded3bf74d41fe70a2e70d7952a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
/* [...] redacted customizations [...] */ | |
--file-margins: var(--size-4-5); | |
} | |
.cm-vimCursorLayer { | |
animation: none !important; | |
} | |
/* ───────────────────────────────────────────────── */ | |
/* <<< LP Heading Level Indicator | |
/* (cribbed from Shimmering Focus) | |
──────────────────────────────────────────────────── */ | |
.is-live-preview .cm-header::before { | |
font-family: var(--font-monospace); | |
font-size: 0.8rem; | |
font-style: normal; | |
line-height: 1em; | |
color: var(--text-muted); | |
position: relative; | |
bottom: 1px; | |
left: -2px; | |
padding-right: 4px; | |
padding-left: 4px; | |
} | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-1::before { content: "H1" } | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-2::before { content: "H2" } | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-3::before { content: "H3" } | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-4::before { content: "H4" } | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-5::before { content: "H5" } | |
.is-live-preview .cm-line:not(.cm-active) > .cm-header-6::before { content: "H6" } | |
.is-live-preview .cm-header ~ .cm-header::before { | |
display: none; /* only first header element gets the prefix */ | |
} | |
/* ───────────────────────────────────────────────── */ | |
/* << Active Line Highlight | |
/* (cribbed from Shimmering Focus) | |
──────────────────────────────────────────────────── */ | |
.cm-active:not(.cm-gutterElement), | |
.CodeMirror-activeline .CodeMirror-linebackground { | |
background-color: var(--background-modifier-hover); | |
border-radius: 4px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @pmbauer for the inspiration... Went down the rabbit hole and came up with this fork :) https://gist.github.com/jmatsushita/ff53393057982216260404abebc003bf?permalink_comment_id=4780082#gistcomment-4780082