Created
February 29, 2024 22:00
-
-
Save stroborobo/a8a31bc49747e8a5109b98749dd8cd70 to your computer and use it in GitHub Desktop.
Obsidian Callout Header Fix Snippet
This file contains 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
.callout { | |
--h1-size: 1.7em; | |
--h2-size: 1.6em; | |
--h3-size: 1.35em; | |
--h4-size: 1.2em; | |
--h5-size: 1.2em; | |
--h6-size: 1.1em; | |
--callout-title-size: 0.9em; | |
--callout-padding: 0 var(--size-4-3) var(--size-4-2) var(--size-4-3); | |
padding: 0; | |
margin: 1.5em 0; | |
.callout-title { | |
min-height: 36px; | |
align-items: center; | |
.callout-title-inner { | |
padding: var(--size-4-1) 0; | |
margin: 0 var(--size-4-1); | |
:is(h1, h2, h3, h4, h5, h6) { | |
margin: 0; | |
} | |
} | |
.callout-icon { | |
margin: 0 var(--size-4-1) 0 var(--size-4-2); | |
} | |
.callout-icon, .callout-fold { | |
align-self: center; | |
} | |
.callout-fold { | |
margin-left: auto; | |
} | |
} | |
.callout-content { | |
padding: var(--callout-padding); | |
} | |
} | |
/* | |
.markdown-rendered .callout { | |
margin: 0 | |
} | |
*/ | |
/***** | |
* callout icons | |
**/ | |
.callout[data-callout] { | |
--callout-icon: attr(data-callout); | |
} | |
/** | |
/* embedded-backlinks equal gap between content and backlinks in source and | |
* preview view | |
**/ | |
.cm-content { | |
padding-bottom: 0 !important; | |
} | |
.markdown-preview-view .embedded-backlinks { | |
margin-top: calc(100px + 1.5em) !important; | |
} | |
.markdown-source-view.is-live-preview .embedded-backlinks { | |
margin-top: 100px !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment