github-vscode-theme
github-vscode-theme copied to clipboard
Markdown preview
The problem
When opening a .md file in "preview" mode with the extension installed, and any of the provided themes activated, the Render looks completely different then markdown rendered on the github.com website. I assumed that the extension would, in an attempt to mimic styling of the GitHub website, make the markdown render look similar. I am not talking about GitHub flavoured markdown features missing (like this issue), just that the styling is different. This affects every theme supplied by the extension.
Proof
Here are two screenshots of the same markdown section:
## Setup
### on Windows
Get Debian,
rendered in both systems:
-
GitHub website

-
vscode Extension

Here are the fonts copied with chrome devtools from both views of the title word "Setup".
/* From the Github website */
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
/* vscode Extension */
font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif);
Solutions
I have found the Markdown Preview Github Styling vscode Extension which does just that, but it does not support dark mode yet.
Opinion
Either way i honestly think, that the official GitHub theme, vscode extension should alter the look of a markdown "preview". Since markdown is (from my experience) largely associated with GitHub. And a developer might want to take a look at how his readme will actually look on GitHub, since he is hosting his repo there. Don't you guys have a simple md-web-view.css file around somewhere? please?
Right now I am using the Markdown Preview Github Styling Extension, and just stick to the default dark vscode theme.
The Markdown Preview Github Styling extension now supports dark mode.
I agree that github-style Markdown preview should be a first-party extenstion to VS-Code. Especially since Microsoft own both Github and VS-Code.
Background info: https://github.blog/2017-03-14-a-formal-spec-for-github-markdown/ https://github.com/github/cmark-gfm
Is this considered? I'd close it otherwise. I think tbh, consistency in these things is key.
Is this considered? I'd close it otherwise. I think tbh, consistency in these things is key.
Maybe we can keep it open, but move it to a Discussion. I'll do that.