Created
April 10, 2024 18:07
-
-
Save claudioluciano/1c108c5fe7804d3ff393f27667d84971 to your computer and use it in GitHub Desktop.
Obsidian - snippet to create spoilers on notes
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
.cm-active[data-task="#"] * { | |
display: initial; | |
} | |
.cm-active[data-task="#"]>label { | |
display: none | |
} | |
[data-task="#"]>* { | |
display: none; | |
} | |
[data-task="#"]>.cm-list-1 { | |
display: initial; | |
position: relative; | |
} | |
[data-task="#"]:not(.cm-active)>.cm-list-1::before { | |
content: ' '; | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background-color: rgb(23, 23, 26); | |
border-radius: 2px; | |
} | |
[data-task="#"]>.cm-list-1:hover::before { | |
display: none | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is based on this reddit comment
*** For now, it's not work in callout or other blocks
show.mov