noatpad / typora-theme-ursine

A Typora theme, inspired by Bear
MIT License
715 stars 86 forks source link

Invisible Mermaid diagrams code #57

Open Mpic opened 4 years ago

Mpic commented 4 years ago

Hello !

I love this theme, but I noticed that it is the only one I know that does not show mermaid code blocks when diagrams are clicked : image

It is supposed to look something like this (here with the Misty Light theme) : image

If that can help, I saw that the Vue theme also does something funny with mermaid diagrams code : image

noatpad commented 4 years ago

This one actually has me stumped. Because for some reason it kinda just loads like that, but if you interact with it some way, it displays normally (or somewhat normally, the code sometimes gets obscured behind the line numbers, which is another thing I haven't been able to figure out).

Entering and exiting Source Code Mode, changing themes, & inputting text puts it back to "normal". It definitely looks like the theme is causing it somehow, but I still can't figure out the culprit

Traveler0014 commented 2 years ago

Noticed that there is another bug that may be related to this. If I try to create a new code block starting with

    ```mermaid

then I will see the cursor is just under the line number, the CodeMirror-code element is covered with CodeMirror-gutters. to fix this display error, I just tap 10 times , till the line number from single-digit changes to '10', and the cursor will back to the right place. image image

Traveler0014 commented 2 years ago

I just found if you comment out these code(Around the line 1126~1129 in ursine-polar.css):

.cm-s-inner {
  padding: .25rem;
  border: 1px solid #0000001a !important;
  border-radius: .25rem;
}

All the problems will go away. Hope it's helpful.