Created
July 3, 2015 22:08
-
-
Save mygeekdaddy/218c81e098c198cf8c63 to your computer and use it in GitHub Desktop.
Custom CSS file from Marked to generated graph lines in PDF files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This document has been created with Marked.app <http://markedapp.com>, Copyright 2011 Brett Terpstra | |
Please leave this notice in place, along with any additional credits below. | |
--------------------------------------------------------------- | |
Title: custom.css | |
Author: Jason Verly (@mygeekdaddy) | |
Description: Custom CSS file to generate 'graph paper' on rendered MD to PDF | |
*/ | |
body { | |
background-color: #fff; | |
background-image: url('graph_paper_sm.png'); | |
-webkit-font-smoothing:antialiased; | |
font-family: 'Helevtica Neue', Avenir, 'Myriad Pro', Arial,Verdana,sans-serif; | |
margin:100px; | |
} | |
html>body | |
{ | |
font-size:13px | |
} | |
li | |
{ | |
font-size:110% | |
} | |
li li | |
{ | |
font-size:100% | |
} | |
li p | |
{ | |
font-size:100%; | |
margin:.5em 0 | |
} | |
h1 | |
{ | |
color:#000; | |
font-size:2.2857em; | |
line-height:.6563em; | |
margin:.6563em 0 | |
} | |
h2 | |
{ | |
color:#111; | |
font-size:1.7143em; | |
line-height:.875em; | |
margin:.875em 0 | |
} | |
h3 | |
{ | |
color:#111; | |
font-size:1.5em; | |
line-height:1em; | |
margin:1em 0 | |
} | |
h4 | |
{ | |
color:#111; | |
font-size:1.2857em; | |
line-height:1.1667em; | |
margin:1.1667em 0 | |
} | |
h5 | |
{ | |
color:#111; | |
font-size:1.15em; | |
line-height:1.3em; | |
margin:1.3em 0 | |
} | |
h6 | |
{ | |
font-size:1em; | |
line-height:1.5em; | |
margin:1.5em 0 | |
} | |
body,p,td,div | |
{ | |
color:#111; | |
font-family: 'Helevtica Neue', Avenir, 'Myriad Pro', Arial,Verdana,sans-serif; | |
word-wrap:break-word | |
margin:20px; | |
} | |
h1,h2,h3,h4,h5,h6 | |
{ | |
line-height:1.5em | |
} | |
a | |
{ | |
-webkit-transition:color .2s ease-in-out; | |
color:#0d6ea1; | |
text-decoration:none | |
} | |
a:hover | |
{ | |
color:#3593d9 | |
} | |
/*h2 em | |
{ | |
color:#111; | |
padding-left:10px; | |
text-shadow:0 1px 0 #FFF | |
}*/ | |
blockquote p | |
{ | |
font-size:110%; | |
font-style:italic; | |
line-height:1.6em; | |
} | |
.footnote | |
{ | |
color:#0d6ea1; | |
font-size:.8em; | |
vertical-align:super | |
} | |
#wrapper img | |
{ | |
max-width:100%; | |
height:auto | |
} | |
dd | |
{ | |
margin-bottom:1em | |
} | |
li > p:first-child | |
{ | |
margin:0 | |
} | |
ul ul,ul ol | |
{ | |
margin-bottom:.4em | |
} | |
caption,col,colgroup,table,tbody,td,tfoot,th,thead,tr | |
{ | |
border-spacing:0 | |
} | |
table | |
{ | |
border:1px solid rgba(0,0,0,0.25); | |
border-collapse:collapse; | |
display:table; | |
empty-cells:hide; | |
margin:-1px 0 23px; | |
padding:0; | |
table-layout:fixed | |
} | |
caption | |
{ | |
display:table-caption; | |
font-weight:700 | |
} | |
col | |
{ | |
display:table-column | |
} | |
colgroup | |
{ | |
display:table-column-group | |
} | |
tbody | |
{ | |
display:table-row-group | |
} | |
tfoot | |
{ | |
display:table-footer-group | |
} | |
thead | |
{ | |
display:table-header-group | |
} | |
td,th | |
{ | |
display:table-cell | |
} | |
tr | |
{ | |
display:table-row | |
} | |
table th,table td | |
{ | |
font-size:1.1em; | |
line-height:23px; | |
padding:0 1em | |
} | |
table thead | |
{ | |
background:rgba(0,0,0,0.15); | |
border:1px solid rgba(0,0,0,0.15); | |
border-bottom:1px solid rgba(0,0,0,0.2) | |
} | |
table tbody | |
{ | |
background:rgba(0,0,0,0.05) | |
} | |
table tfoot | |
{ | |
background:rgba(0,0,0,0.15); | |
border:1px solid rgba(0,0,0,0.15); | |
border-top:1px solid rgba(0,0,0,0.2) | |
} | |
figure | |
{ | |
display:inline-block; | |
margin-bottom:1.2em; | |
position:relative; | |
margin:1em 0 | |
} | |
figcaption | |
{ | |
font-style:italic; | |
text-align:center; | |
background:rgba(0,0,0,.9); | |
color:rgba(255,255,255,1); | |
position:absolute; | |
left:0; | |
bottom:-24px; | |
width:98%; | |
padding:1%; | |
-webkit-transition:all .2s ease-in-out; | |
} | |
figure:hover>figcaption | |
{ | |
/* background:rgba(0,0,0,1) */ | |
} | |
/* Styles used when "Tab-indented text is poetry" is set */ | |
.poetry pre | |
{ | |
display:block; | |
font-family:Georgia, Garamond, serif!important; | |
font-size:110%!important; | |
font-style:italic; | |
line-height:1.6em; | |
margin-left:1em | |
} | |
.poetry pre code | |
{ | |
font-family:Georgia, Garamond, serif!important | |
} | |
/* important rules for keeping line-height from being affected by sub */ | |
sup,sub,a.footnote | |
{ | |
font-size:1.4ex; | |
height:0; | |
line-height:1; | |
position:relative; | |
} | |
sup { | |
vertical-align:super; | |
} | |
sub { | |
vertical-align: sub; | |
top: -1px; | |
} | |
p,h5 | |
{ | |
font-size:1.1429em; | |
line-height:1.3125em; | |
margin:1.3125em 0 | |
} | |
dt,th | |
{ | |
font-weight:700 | |
} | |
table tr:nth-child(odd),table th:nth-child(odd),table td:nth-child(odd) | |
{ | |
background:rgba(255,255,255,0.06) | |
} | |
table tr:nth-child(even),table td:nth-child(even) | |
{ | |
background:rgba(0,0,0,0.06) | |
} | |
@media print { | |
body.custom { | |
background-color: #fff; | |
background-image: url('graph_paper_sm.png'); | |
-webkit-font-smoothing:antialiased; | |
font:normal 1em 'Helevtica Neue', Avenir, 'Myriad Pro', Arial,Verdana,sans-serif; | |
margin:100px; | |
} | |
p { | |
margin-left: 25px; | |
font:normal 1em 'Helevtica Neue', Avenir, 'Myriad Pro', Arial,Verdana,sans-serif; | |
} | |
#wrapper { | |
background: transparent !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment