HarshdeepGupta / live-html-preview

The most popular extension for previewing HTML documents.
https://marketplace.visualstudio.com/items?itemName=hdg.live-html-previewer
26 stars 15 forks source link

Remove injected CSS #3

Closed kaiwood closed 7 years ago

kaiwood commented 7 years ago

Previously, it wasn't possible to override the styles that where injected through the custom stylesheet.

kaiwood commented 7 years ago

2 problems I noticed: It's not possible to set a custom background color for the body tag and the size of h1..h6 are all the same. It's not even possible to overwrite the injected CSS with "!important", I guess that's just the way the preview component from VSCode works.

From what I understand in the code, the reasoning for adding it was some display problems of the preview. I checked if there where still display problems and couldn't find one. As the extension is a little older now, I suspect that those problems are gone in newer versions of VSCode - which makes sense as they are using a way newer version of Electron and fixed so many stuff.

You might check this first for yourself if you remember any specific problems.

Screenshot before patch:

screen shot 2016-10-13 at 11 41 08

Screenshot after patch:

screen shot 2016-10-13 at 11 51 41