Skip to content

Instantly share code, notes, and snippets.

@4lun
Created September 6, 2014 17:06
Show Gist options
  • Save 4lun/843de4a5c21c3adef333 to your computer and use it in GitHub Desktop.
Save 4lun/843de4a5c21c3adef333 to your computer and use it in GitHub Desktop.
Style that makes standard HTML look like Markdown
body {
margin: 0;
padding: 50px 100px;
font-family: monospace;
font-size: 16px;
color: #888;
background: #f1f1f1;
line-height: 1.5;
font-weight: 400;
}
h1, h2, h3, h4, h5, h6, p {
margin: 10px 0 20px;
padding: 0;
max-width: 780px;
}
h1, h2, h3, h4, h5, h6 {
color: #555;
font-weight: 400;
line-height: 1.3;
position: relative;
}
h1:before, h2:before, h3:before,
h4:before, h5:before, h6:before {
color: #ccc;
position: absolute;
right: 100%;
margin-right: 10px;
}
h1:before { content: "# "; }
h2:before { content: "## "; }
h3:before { content: "### "; }
h4:before { content: "#### "; }
h5:before { content: "##### "; }
h6:before { content: "###### "; }
h1:after, h2:after, h3:after,
h4:after, h5:after, h6:after {
content: "___";
color: #ccc;
display: block;
margin: 0 0 20px;
}
h1 { font-size: 24px; }
h2 { font-size: 22px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 17px; }
h6 { font-size: 16px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment