blinkfox / typora-vue-theme

This is a typora theme inspired by Vue document style. 一个类似于 Vue 文档风格的 Typora Markdown 编辑器主题。
https://theme.typora.io/theme/Vue/
Apache License 2.0
931 stars 180 forks source link

HTML Rendering Problem #14

Closed devkapupara closed 5 years ago

devkapupara commented 5 years ago

First of all, thank you for this awesome theme. It was just the type of dark theme I was looking for. I noticed a weird HTML rendering issue. I created a normal H3 tag as follows.

HTML Rendering problem??

. It displays it correctly when I do not hover over it or try to edit it. But If I hover, the whole background becomes white making it difficult to read the text. Same thing when I click on it to edit. I can see the green open h3 and close h3 but the background is white due to which the text dissolves into it making it difficult to edit it to. html rendering [Video](https://www.dropbox.com/s/o9s57xwsp6x7lo4/html%20problem.mov?dl=0) for the bug so you can see what I'm talking about.
blinkfox commented 5 years ago

Hello, It is the style of the Typora editor. I probably simulated and debugged it. You need to override some styles, the style is as follows:

.md-rawblock-control:not(.md-rawblock-tooltip) {
    /* Your own css properties. */
    background: #666;
    color: #fff;
}

.md-rawblock-on-edit>.md-rawblock-tooltip, .md-rawblock:hover>.md-rawblock-container, .md-rawblock:hover>.md-rawblock-tooltip {
    /* Your own css properties. */
    background: #666;
    color: #fff;
}

snip20190122_1 snip20190122_2

devkapupara commented 5 years ago

Hello,

Sorry for the late reply. Do I just add those lines to your theme css file?

Thank you for your prompt reply.

blinkfox commented 5 years ago

Sorry, I am busy recently, and I don't quite understand what your usage scenario.

typora-vue-theme is not a dark theme, why do you want to make it dark? Are you trying to develop a dark theme like this? If this is the case, you can refer to Night theme.

devkapupara commented 5 years ago

I was using your dark theme. And HTML didn't render properly in it. Once I added those lines of code you provided above, it was fixed. Thank you!