Skip to content

Instantly share code, notes, and snippets.

@lukereative
Last active December 24, 2015 05:29
Show Gist options
  • Save lukereative/6750603 to your computer and use it in GitHub Desktop.
Save lukereative/6750603 to your computer and use it in GitHub Desktop.
My personal Markdown stylesheet.
* { margin: 0; padding: 0; }
abbr,acronym,blockquote,code,dir,kbd,listing,plaintext,q,samp,tt,var,xmp { hyphens: none; }
html {
font: normal 18px/1.65 Open Sans, sans-serif;
color: #000;
hyphens: auto;
word-wrap: break-word;
background: #fff;
}
@media screen {
html {
padding: 2em;
}
}
body > :first-child {
margin-top: 0;
}
/* @group Headings */
h1,h2,h3,h4,h5,h6 {
line-height: 1;
margin: 0;
margin-top: 1.5rem;
text-rendering: optimizeLegibility;
}
h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
/* @end */
small {
font-size: 65%;
}
p {
margin-top: 1rem;
}
hr {
margin: 1rem 0;
opacity: .5;
}
ol,ul {
margin: 1.5rem 0;
}
ol ul, ol ol, ul ul, ul ol {
margin-left: 2rem;
margin-bottom: 1.5rem;
}
li {
margin: .25em 0 .25em 1.5em;
}
abbr {
font-variant: small-caps;
font-weight: 600;
text-transform: lowercase;
color: #808080;
}
abbr[title]:hover {
cursor: help;
}
/* @group Block Quotes */
blockquote {
border-left: 5px solid #333;
padding-left: 1rem;
font-family: Gentium Basic, serif;
font-style: italic;
}
blockquote + figcaption {
display: block;
margin-top: -1.5rem;
margin-bottom: 1.5rem;
font-size: 75%;
text-align: right;
}
blockquote + figcaption:before {
content: "— ";
opacity: .05;
}
/* @end */
/* @group Pre-formatted and Code */
pre {
overflow: auto;
margin: 1rem 0;
padding: .5rem;
font-size: .875em;
white-space: pre;
background-color: #f8f8f8;
border: 1px solid #ccc;
border-radius: 3px;
}
code {
padding: 0 .25em;
white-space: pre;
font-family: Source Code Pro, monospace;
background-color: #f8f8f8;
border: 1px solid #ccc;
border-radius: 3px;
}
pre code {
padding: 0;
word-wrap: normal;
white-space: pre-wrap;
}
pre code, pre tt {
background-color: transparent;
border: none;
}
/* @end */
/* @group Tables */
table {
margin: 1rem 0;
padding: 0;
border-collapse: collapse;
}
table tr {
margin: 0;
padding: 0;
border-top: 1px solid #ccc;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
table tr th {
margin: 0;
padding: .35em 1rem;
font-weight: bold;
border: 1px solid #ccc;
}
table tr td {
margin: 0;
padding: .35em 1rem;
border: 1px solid #ccc;
}
table tr th :first-child, table tr td :first-child { margin-top: 0; }
table tr th :last-child, table tr td :last-child { margin-bottom: 0; }
/* @end */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment