tht13 / html-preview-vscode

A HTML previewer for Visual Studio Code
MIT License
44 stars 22 forks source link

Preview pane inherits editor style #21

Open timfee opened 5 years ago

timfee commented 5 years ago

I'm using a dark theme and the HTML preview pane inherits its style.

To repro:

Create test.html with the following contents:

<html>
  <body>
    hi
  </body>
</html> 

Expected results:

The text hi shows as black text against white background.

Actual results:

The text shows up in the same visual style as my dark theme.

Thanks!

kasanitej commented 5 years ago

Hi, Is your issue sorted?

sabasjon commented 5 years ago

I have the same issue, when using a Light Theme, the preview shows as expected with Black Text / White background etc

image

However - when using a Dark Theme - the text is not overly visible in the preview

image

Any help appreciated - not sure if its a setting we can change ?

Cheers

shockthetoast commented 5 years ago

I am having the exact same issue as well. Setting background and font colors specifically will fix it, but I'm working on cleaning up some files where we are only updating content and not styles.

Enrico-R commented 4 years ago

I have this issue too.
I use the dark theme and the preview is unusable. Changing theme when I switch from Latex (or from other language) to html is boring. Otherwise this preview would be perfect. Best, Enrico

bmix commented 4 years ago

Same for me. Eventually this could be solved by letting the user define a default stylesheet?

EDIT: Suggestion seems invalid. I just tried to force the CSS changes from within my HTML document, but certain default styles seem to be deeply encoded into the editor. This may be more a VSCode isseu, than an extension issue.