Skip to content

Instantly share code, notes, and snippets.

@jbrooksuk
Forked from imjasonh/markdown.css
Created April 10, 2015 16:36
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jbrooksuk/2d6989c35c77bf0c62f9 to your computer and use it in GitHub Desktop.
Save jbrooksuk/2d6989c35c77bf0c62f9 to your computer and use it in GitHub Desktop.
Ordered list
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
h1::before { content: "# "; }
h2::before { content: "## "; }
h3::before { content: "### "; }
h4::before { content: "#### "; }
h5::before { content: "##### "; }
h6::before { content: "###### "; }
strike::after, strike::before { content: "~~"; }
i::before, i::after { content: "*"; }
b::before, b::after { content: "**"; }
ol, ul { list-style: none; padding-left: 0; }
ul li::before { content: "* "; }
ol { counter-reset: numberlist; }
ol li { counter-increment: numberlist; }
ol li::before { content: counter(numberlist) ". "; }
code::before, code::after { content: "`"; }
pre::before { content: "```" attr(lang) "\A"; }
pre::after { content:"```\A"; }
a::before { content: "["; }
a::after { content: "](" attr(href) ")"; }
tr::before { content: "| "; }
td::after { content: " | "; }
thead td::after { content: " | \A-----| "; white-space: pre; }
@fiatjaf
Copy link

fiatjaf commented Apr 10, 2015

Merge this please.

@DanielApt
Copy link

Was thinking how to tackle this. Haven't seen the counter property before!

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