Closed buthow-top closed 2 years ago
@buthow-top Thanks for the snippet
I was having some issues even after applying the snippet This is what worked for me
.cm-s-obsidian div.HyperMD-codeblock-begin-bg:before {
position: absolute;
content: "";
width: 100%;
height: 100%;
margin-top: 1.5em;
border-top-left-radius: 0.3em;
border-top-right-radius: 0.3em;
background-color: #191621;
}
Thank You, guys. Your suggestions helped me fix the same issue. :)
I also had an issue with the bottom part of the code block as well so I tried a few options, inspired by your comments and this works for me:
.cm-s-obsidian div.HyperMD-codeblock-end-bg:before {
position: absolute;
content: '';
bottom: -39%;
left: 0;
width: 100%;
height: 0%;
margin-bottom: 1.5em;
border-bottom-left-radius: 0.3em;
border-bottom-right-radius: 0.3em;
background-color: #191621;
}
Hope this helps someone. ;)
Can someone issue a PR for these fixes?
Thanks all. This is my favorite theme, but that code block issue has been really driving me crazy. The first fix (-60%) worked for me.
like this
it can be fixed like this,change top:-5% to -60%
.cm-s-obsidian div.HyperMD-codeblock-begin-bg:before { position: absolute; content: ''; top: -60%; left: 0; width: 100%; height: 60%; border-top-left-radius: 0.3em; border-top-right-radius: 0.3em; background-color: #191621; }