Skip to content

Instantly share code, notes, and snippets.

@photuris
Created January 18, 2011 19:37
Show Gist options
  • Save photuris/784996 to your computer and use it in GitHub Desktop.
Save photuris/784996 to your computer and use it in GitHub Desktop.
xhtml2pdf.css
@font-face {
font-family: Inconsolata;
src: url(/usr/local/share/Inconsolata.ttf);
}
@page {
size: letter;
margin: .75in;
}
html {
font-family: Helvetica;
font-size: 11px;
font-weight: normal;
color: #000000;
background-color: transparent;
margin: 0;
padding: 0;
line-height: 150%;
border: 1px none;
display: inline;
width: auto;
height: auto;
white-space: normal;
}
b,
strong {
font-weight: bold;
}
i,
em {
font-style: italic;
}
u {
text-decoration: underline;
}
s,
strike {
text-decoration: line-through;
}
a {
text-decoration: underline;
color: blue;
}
ins {
color: green;
text-decoration: underline;
}
del {
color: red;
text-decoration: line-through;
}
pre,
code,
kbd,
samp,
tt {
display: block;
font-family: Inconsolata;
font-size: 12px;
padding: 10px 10px 5px 10px !important;
background-color: #EFEFEF;
color: #15366D;
margin-left: 30px !important;
margin-bottom: 21px !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 2.5em 0 1em 0;
font-weight: bold;
-pdf-outline: true;
-pdf-outline-open: false;
}
h1 {
/*18px via YUI Fonts CSS foundation*/
font-size:138.5%;
-pdf-outline-level: 0;
}
h2 {
/*16px via YUI Fonts CSS foundation*/
font-size:123.1%;
-pdf-outline-level: 1;
}
h3 {
/*14px via YUI Fonts CSS foundation*/
font-size:108%;
-pdf-outline-level: 2;
}
h4 {
-pdf-outline-level: 3;
}
h5 {
-pdf-outline-level: 4;
}
h6 {
-pdf-outline-level: 5;
}
p,
pre,
hr {
margin: 1em 0;
}
address,
blockquote,
body,
center,
dl,
dir,
div,
fieldset,
form,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
isindex,
menu,
noframes,
noscript,
ol,
p,
pre,
table,
th,
tr,
td,
ul,
li,
dd,
dt,
pdftoc {
display: block;
}
table {
-pdf-keep-in-frame-mode: shrink;
}
tr,
th,
td {
vertical-align: middle;
width: auto;
}
th {
text-align: center;
font-weight: bold;
}
center {
text-align: center;
}
big {
font-size: 125%;
}
small {
font-size: 75%;
}
ul {
margin-left: 1.5em;
list-style-type: disc;
}
ul ul {
list-style-type: circle;
}
ul ul ul {
list-style-type: square;
}
ol {
list-style-type: decimal;
margin-left: 1.5em;
}
pre {
white-space: pre;
}
blockquote {
margin-left: 1.5em;
margin-right: 1.5em;
}
noscript {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment