Last active
June 2, 2025 20:41
-
-
Save qazer2687/18b836fb6655cfe7f590ae49d61ce9c9 to your computer and use it in GitHub Desktop.
This CSS snippet displays header markdown when in live preview.
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
| /* Made by @qazer2687 on GitHub. */ | |
| .is-live-preview .cm-header::before { | |
| left: -2px; | |
| color: var(--text-faint); | |
| font-family: var(--font-monospace); | |
| display: inline; | |
| vertical-align: text-top; | |
| } | |
| .is-live-preview .cm-line .cm-header-1::before { content: "# "; } | |
| .is-live-preview .cm-line .cm-header-2::before { content: "## "; } | |
| .is-live-preview .cm-line .cm-header-3::before { content: "### "; } | |
| .is-live-preview .cm-line .cm-header-4::before { content: "#### "; } | |
| .is-live-preview .cm-line .cm-header-5::before { content: "##### "; } | |
| .is-live-preview .cm-line .cm-header-6::before { content: "###### "; } | |
| .is-live-preview .cm-line:has(.cm-formatting-header) .cm-header::before { | |
| display: none; | |
| } | |
| .is-live-preview .cm-header ~ .cm-header::before { | |
| display: none; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment