Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Replace PDF CSS with new CSS in template
<?php
/**
* Remove the default PDF stylesheet
*/
remove_action( 'si_head', array( 'SI_PDF', 'si_add_stylesheet' ), 100 );
/**
* Add a new pdf stylesheet
*/
add_action( 'si_head', '_custom_si_add_stylesheet' );
function _custom_si_add_stylesheet() {
if ( SI_PDF::want_create_pdf() ) {
echo '<link rel="stylesheet" id="si-pdf-css" href="' . get_stylesheet_directory() . '/pdf.css" type="text/css" media="all">';
}
}
body {
background-color: #FFF;
}
#wpadminbar {
display: none;
}
#document_wrap {
border: none;
}
#outer_doc_wrap {
padding: 0px !important;
}
#doc {
padding: 0px !important;
}
.header_info,
#logo {
width: 48%;
}
#header_logo #logo {
width: 48%;
}
#doc_line_items {
margin-top: 20px;
}
#header_wrap {
margin-bottom: 0px;
}
.status_wrap {
text-transform: uppercase;
font: bold 1.3em/1.1em;
letter-spacing: .1em;
text-align: center;
color: #FFF;
background-color: #8CBA52;
padding: 10px 5px;
margin-bottom: 30px;
}
#declined_status_wrap {
background-color: #000;
}
#pending_status_wrap {
background-color: #FCA428;
}
#line_items_footer {
margin-top: 25px;
padding-top: 15px;
padding-bottom: 16px;
border-top: 1px solid #eee;
display: block;
}
#doc_line_items {
border-top: 1px solid #eee;
}
#footer_wrap {
padding: 20px 10px;
}
.pdf_line_item {
padding-right: 3em !important;
margin-bottom: 1em !important;
}
.line_item_ind_desc {
font-weight: bold
}
.pdf_child_items {
padding-left: 25px;
}
.item_with_children {
padding: 1px 15px;
background-color: #FAFAFA;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment