Skip to content

Instantly share code, notes, and snippets.

@xl1
Created May 9, 2015 07:54
Show Gist options
  • Save xl1/d132dc6a4aae29c90ad1 to your computer and use it in GitHub Desktop.
Save xl1/d132dc6a4aae29c90ad1 to your computer and use it in GitHub Desktop.
Visual Studio Code の Markdown プレビューのスタイルを変更するには?

Visual Studio Code の Markdown プレビューのスタイルを変更するには?

Visual Studio Code はリアルタイム Markdown プレビューがついているけど、 デフォルトでは漢字のフォントが SimSun になっちゃってた

このスタイルは settings.jsonmarkdown.styles を設定することで変更できる

デフォルトの CSS はこうなっている (Windows, Light theme の場合) これは path/to/Code/app-0.1.0/resources/app/client/vs/languages/markdown/markdownWorker.js に書いてあり、もちろん F12 で Developer tools で見ることもできる

::-webkit-scrollbar {
	width: 14px;
	background-color: #F5F5F5;
}

::-webkit-scrollbar-track {
	background-color: white;
}

::-webkit-scrollbar-thumb {
	background-color: rgba(100, 100, 100, 0.4);
}
body {
	font-family: "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", sans-serif;
	padding-left: 12px;
}

a {
	color: #4080D0;
	text-decoration: none;
}

a:hover {
	color: #4080D0;
	text-decoration: underline;
}

.vs-dark {
	color: #DDD;
	background-color: #1E1E1E;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment