mjbvz / vscode-github-markdown-preview-style

VS Code extension that changes the built-in markdown preview to match Github's styling
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles
MIT License
303 stars 57 forks source link

Top margin being applied to first item in the document #49

Closed xt0rted closed 2 years ago

xt0rted commented 5 years ago

I'm working on an extension that extends this one and while doing so I noticed all of my h1 headings had a top margin, while on github.com they didn't.

When using the this method of adding an additional style sheet to the document the style element is added to the body not the head which causes the following rule to not apply.

https://github.com/mjbvz/vscode-github-markdown-preview-style/blob/8d4a43c3ccaa9f2e3464cafa251d2e244bc93398/github-markdown.css#L381-L383

Is there another way to add the syntax theme so it goes into the head of the document instead of the body?

mjbvz commented 5 years ago

Have you tried using a markdown style contribution instead?

xt0rted commented 5 years ago

I'm using that to add the GitHub Dark style, but I'm using the code method for the syntax theme since the user can pick which one to use.

mjbvz commented 5 years ago

Add it to the end of the html instead?

xt0rted commented 5 years ago

That's what I was going to try next, I just wasn't sure if there was a way to get this into the head tag via code. I also figured I'd bring up the issue since your Prism extension, if it works with this plugin, will have the same issue.

mjbvz commented 2 years ago

Closing this as I think it's out of scope of this extension