Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Forked from imjasonh/markdown.css
Last active June 30, 2018 22:42
Show Gist options
  • Save jtsternberg/34fca419d950d516843db5ac29a90b8c to your computer and use it in GitHub Desktop.
Save jtsternberg/34fca419d950d516843db5ac29a90b8c to your computer and use it in GitHub Desktop.
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: #333;
cursor: default;
margin: 0;
padding: 0;
}
h1::before { content: "\\A# "; }
h2::before { content: "\\A## "; }
h3::before { content: "\\A### "; }
h4::before { content: "\\A#### "; }
h5::before { content: "\\A##### "; }
h6::before { content: "\\A###### "; }
strike::after, strike::before { content: "~~"; }
i::before, i::after, em::before, em::after { content: "*"; }
b::before, b::after, strong::before, strong::after { content: "**"; }
ol, ul { list-style: none; padding-left: 0; }
ol::before, ul::before { content: "\\A"; white-space: pre; }
ul li::before { content: '* ' }
ol li::before { content: '0. ' }
code::before, code::after { content: "\`"; }
pre::before { content:"\\A\`\`\`" attr(lang) "\\A"; }
pre::after { content:"\\A\`\`\`"; }
a::before { content: "["; }
a::after { content: "](" attr(href) ")"; }
p::before, p::after { content: "\\A"; white-space: pre; }
tr::before { content: "| "; }
td::after { content: " | "; }
thead td::after { content: " | \\A-----| "; white-space: pre; }
hr { height: 1em; border: 0; background-color: none; line-height: 1em; }
hr::after { content: '---------'; line-height: 1px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment