Created
July 28, 2023 11:16
-
-
Save m0rtyn/36f916459c0ad9c00e9eda72f89ff924 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
.markdown-source-view .cm-content > .cm-line { | |
padding-top: 0.5em !important; | |
padding-bottom: 0.5em !important; | |
} | |
.markdown-source-view .cm-content > .cm-line.HyperMD-list-line { | |
padding-top: 0.3em !important; | |
padding-bottom: 0.3em !important; | |
} | |
.markdown-source-view .cm-content > .cm-line.HyperMD-header { | |
padding-top: 0.6em !important; | |
padding-bottom: 0.3em !important; | |
} | |
.cm-active:not(.cm-gutterElement) { | |
background-color: #ffffff07; | |
border-radius: 4px; | |
box-shadow: 0 0 0 4px #ffffff07; | |
outline: #fff3 solid 2px; | |
outline-offset: 4px; | |
} | |
body { | |
--tab-stacked-pane-width: 100%; | |
} | |
/* better frontmatter */ | |
.cm-line.cm-line:has(.cm-hmd-frontmatter) { | |
font-size: 0.8rem; | |
padding: 0.3em 0.9em !important; | |
background-color: #0007; | |
} | |
.cm-line.cm-line:has(.cm-hmd-frontmatter):first-of-type { | |
border-radius: 8px 8px 0 0; | |
} | |
/* better image preview */ | |
.markdown-source-view.mod-cm6 .cm-content > img, | |
.markdown-source-view.mod-cm6 .image-embed > img { | |
margin-top: 0.5rem !important; | |
margin-bottom: 0.5rem !important; | |
border-radius: 8px; | |
} | |
.cm-image, .cm-hmd-embed { | |
} | |
.cm-active.cm-line:has(.cm-image) + img, | |
.cm-active.cm-line:has(.cm-image) > img, | |
.cm-active.cm-line:has(.cm-hmd-embed) + .image-embed > img { | |
display: block !important; | |
margin-top: 0 !important; | |
} | |
.cm-active.cm-line:has(.cm-image), | |
.cm-active.cm-line:has(.cm-hmd-embed) { | |
font-size: 0.8rem; | |
opacity: 0.8; | |
display: block; | |
position: relative; | |
} | |
.cm-active.cm-line:has(.cm-image)::before, | |
.cm-active.cm-line:has(.cm-hmd-embed)::before { | |
content: "🖼 "; | |
position: absolute; | |
z-index: 1; | |
left: 0; | |
top: 0; | |
/* margin-left: -2rem; */ | |
} | |
/* fix headings for dataview */ | |
.markdown-rendered h1, | |
.markdown-rendered h2, | |
.markdown-rendered h3, | |
.markdown-rendered h4, | |
.markdown-rendered h5, | |
.markdown-rendered h6 { | |
margin: 0.5em 0 !important; | |
} | |
.dataview ul { | |
margin: 0 !important; | |
} | |
.cm-sizer > .cm-contentContainer > .cm-content { | |
padding-bottom: 0 !important; | |
} | |
/* fix for linethrough for checklists */ | |
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="x"] { | |
text-decoration-color: dimgrey; | |
} | |
/* better backlinks panel */ | |
.embedded-backlinks { | |
margin-top: 3rem; | |
border-width: 0.5rem; | |
} | |
.embedded-backlinks * { | |
color: gray !important; | |
} | |
/* fix hashtag coloring inside heading inside list item*/ | |
.cm-hashtag.cm-hashtag { | |
color: var(--tag-color); | |
background-color: var(--tag-background); | |
} | |
/* line number visible on active line */ | |
.cm-gutterElement { | |
opacity: 0; | |
} | |
.cm-gutterElement.cm-active { | |
opacity: 1; | |
} | |
/* checkboxes like a Notion */ | |
input[type=checkbox] { | |
border-color: var(--text-normal); | |
border-radius: 0; | |
} | |
input[type=checkbox]:checked:after { | |
background-color: var(--text-normal); | |
} | |
input[type=checkbox][data-task="-"]:checked:after, | |
.dataview.is-checked[data-task="-"] > input[type=checkbox]:after { | |
content: "–"; | |
font-weight: bold; | |
position: absolute; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
background-color: gray; | |
-webkit-mask: none; | |
} | |
/* ### fix for nested codeblocks in obsidian */ | |
.HyperMD-codeblock { | |
--code-background: #0003; | |
} | |
.HyperMD-list-line-nobullet ~ .HyperMD-codeblock:has(.cm-indent) { | |
margin-left: 3em !important; | |
background-color: var(--code-background) !important; | |
} | |
.HyperMD-list-line-nobullet ~ .HyperMD-codeblock .cm-indent:first-child { | |
display: none !important; | |
} | |
.HyperMD-codeblock.HyperMD-codeblock-begin.HyperMD-codeblock-begin.HyperMD-codeblock-begin, | |
.HyperMD-codeblock.HyperMD-codeblock-end.HyperMD-codeblock-end.HyperMD-codeblock-end { | |
padding-top: 0 !important; | |
padding-bottom: 0.3em !important; | |
line-height: 0.8em !important; | |
background-color: transparent !important; | |
} | |
.HyperMD-codeblock.HyperMD-codeblock-begin.HyperMD-codeblock-begin.HyperMD-codeblock-begin .cm-formatting, | |
.HyperMD-codeblock.HyperMD-codeblock-end.HyperMD-codeblock-end.HyperMD-codeblock-end .cm-formatting { | |
font-size: 0.65em !important; | |
} | |
.HyperMD-codeblock-begin + .HyperMD-codeblock { | |
border-radius: 1rem 1rem 0 0 !important; | |
} | |
.HyperMD-codeblock:has(+ .HyperMD-codeblock-end) { | |
border-radius: 0 0 1rem 1rem !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment