github-vscode-theme icon indicating copy to clipboard operation
github-vscode-theme copied to clipboard

Markdown preview

Open junaga opened this issue 4 years ago • 4 comments

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 image

  • vscode Extension image

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?

junaga avatar May 23 '21 20:05 junaga

Right now I am using the Markdown Preview Github Styling Extension, and just stick to the default dark vscode theme.

junaga avatar Jun 03 '21 15:06 junaga

The Markdown Preview Github Styling extension now supports dark mode.

junaga avatar Jan 09 '22 11:01 junaga

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

AriESQ avatar Feb 09 '22 17:02 AriESQ

Is this considered? I'd close it otherwise. I think tbh, consistency in these things is key.

junaga avatar Jul 30 '22 20:07 junaga

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.

simurai avatar Jan 06 '23 07:01 simurai