Skip to content

Instantly share code, notes, and snippets.

@haishanh
Last active August 9, 2016 04:28
Show Gist options
  • Save haishanh/efe17d20fa20c1b629e2f9d9d3a3b1c8 to your computer and use it in GitHub Desktop.
Save haishanh/efe17d20fa20c1b629e2f9d9d3a3b1c8 to your computer and use it in GitHub Desktop.
{
"enable_highlight": true,
"enable_pygments": true,
"guess_language": true,
"css": "path/to/style-for-sublimetext-markdown-preview.css",
"strip_yaml_front_matter": true,
"image_path_conversion": "relative",
"enabled_extensions": ["extra", "github", "toc", "codehilite(guess_lang=True,pygments_style=friendly,linenums=False)","headerid", "meta", "sane_lists", "smarty", "wikilinks", "admonition"],
}
*,
*:before,
*:after {
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", "PingFang-SC-Regular","STHeiti", "Helvetica","Arial","Verdana","sans-serif","Microsoft YaHei";
margin: 0;
}
em {
color: #333;
}
p {
line-height: 1.5em;
}
p > img {
display: block;
margin: 2em auto;
max-width: 100%;
}
a {
color: #4183C4;
}
hr {
border-top: 1px solid #aaa;
border-bottom: none;
}
h2,
h3 {
font-weight: 300;
}
h2 {
color: #cd242a;
font-size: 2em;
}
h3 {
color: #384992;
font-size: 1.5em;
}
h4 {
font-size: 1.2em;
}
blockquote > p {
margin: 0;
}
blockquote {
border-left: 2px solid #ccc;
margin: 0;
padding: 10px 20px;
margin-left: 25px;
}
h1:first-child {
text-align: center;
}
li {
line-height: 1.7em;
}
li > p {
margin: 0 0 5px;
}
code {
padding: 2px;
font-family: Inconsolata, "Ubuntu Mono", Consolas, monospace;
background: #eee;
border-radius: 4px;
margin: 0 5px;
}
.codehilite pre {
overflow: auto;
padding: 1em;
font-family: Inconsolata, "Ubuntu Mono", Consolas, monospace;
font-size: 0.9em;
line-height: 1.5em;
border-radius: 5px;
}
article.markdown-body {
//width: 80%;
margin: auto;
}
.admonition {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
text-align: left;
}
.admonition.note {
color: #3a87ad;
background-color: #d9edf7;
border-color: #bce8f1;
}
.admonition-title {
font-weight: bold;
text-align: left;
}
/* fixed TOC */
.toc {
position: fixed;
font-size: 0.8em;
border-right: 1px dashed #ccc;
width: 210px;
height: 100%;
left: 0;
top: 0;
background: #f9f9f9;
}
.toc:before {
content: "In this page";
display: block;
margin: 0;
margin-top: 10px;
padding: 0 10px;
border-left: 5px solid #03a9f4;
font-size: 1.3em;
}
article.markdown-body {
padding-left: 230px;
padding-right: 20px;
}
.toc li {
list-style: none;
}
.toc ul {
padding-left: 15px;
}
.toc a {
text-decoration: none;
}
/* Temporary */
p > img {
max-width: 70%;
}
p > small {
text-align: right;
}
/* table */
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
padding-bottom: 10px;
display: block;
width: 100%;
overflow: auto;
word-break: keep-all;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body table th {
font-weight: bold;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
@haishanh
Copy link
Author

Install Markdown Preview via Package Control

Here is the GitHub repo of the Markdown Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment