Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 46 additions & 7 deletions dist/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,33 @@ body,
max-width: auto !important;
}

/*
* Override VS Code's --vscode-* theme variables within the GitHub preview
* scope so the dark editor theme doesn't bleed into the light preview.
* See: https://github.com/mjbvz/vscode-github-markdown-preview-style/issues/48
*/
.github-markdown-body {
background-color: var(--bgColor-default);
color: var(--fgColor-default);
--vscode-editor-foreground: var(--fgColor-default);
--vscode-foreground: var(--fgColor-default);
--vscode-textCodeBlock-background: var(--bgColor-muted);
--vscode-widget-border: var(--borderColor-default);
--vscode-editor-font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);

background-color: var(--bgColor-default) !important;
color: var(--fgColor-default) !important;
}

.github-markdown-body h1,
.github-markdown-body h2,
.github-markdown-body h3,
.github-markdown-body h4,
.github-markdown-body h5,
.github-markdown-body h6 {
color: var(--fgColor-default) !important;
}

.github-markdown-body a {
color: var(--fgColor-accent) !important;
}

.github-markdown-body {
Expand Down Expand Up @@ -38,23 +62,28 @@ body,

.github-markdown-body blockquote {
background-color: initial;
border-left-color: var(--borderColor-default) !important;
color: var(--fgColor-muted) !important;
}

.github-markdown-body pre {
color: initial;
border: none;
color: var(--fgColor-default) !important;
background-color: var(--bgColor-muted) !important;
border: 1px solid var(--borderColor-default) !important;
}

.github-markdown-body code {
color: inherit;
color: inherit !important;
background-color: var(--bgColor-neutral-muted) !important;
}

.github-markdown-body pre code {
color: initial;
color: var(--fgColor-default) !important;
background-color: transparent !important;
}

.github-markdown-body code > div {
background: none
background: none !important;
}

.github-markdown-body.showEditorSelection .code-line .code-line:hover:before {
Expand All @@ -72,6 +101,16 @@ body,
margin-bottom: 16px;
}

.github-markdown-body hr {
background-color: var(--borderColor-muted) !important;
border: 0 !important;
}

.github-markdown-body table th,
.github-markdown-body table td {
border-color: var(--borderColor-default) !important;
}

:is(.vscode-dark, .vscode-light).showEditorSelection .code-active-line:before {
border-left: 3px solid var(--borderColor-default);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-preview-github-styles",
"version": "2.1.0",
"version": "2.2.1",
"displayName": "Markdown Preview Github Styling",
"description": "Changes VS Code's built-in markdown preview to match Github's style",
"keywords": [
Expand Down