app/assets/stylesheets/admin/_print_style.scss
body {
font-size: 10pt;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
@page {
margin-top: 2cm;
margin-bottom: 2cm;
}
#admin-navbar,
.admin-footer,
.btn,
fieldset,
input.search-query,
.help-inline,
.role-filter,
#mass_add_tag_new_tag_substring {
display: none !important;
}
a {
color: #08c !important;
}
//Open the accordions when printing
.accordion-body.collapse {
height: auto !important;
}
.accordion-heading {
padding-bottom: 15px !important;
}
// Tables styling
table {
page-break-after: auto;
border: 1px solid #d1d1d1;
border-collapse: collapse;
margin-bottom: 20px;
}
tr {
page-break-inside: avoid;
page-break-after: auto;
-webkit-print-color-adjust: exact;
&:nth-child(odd) {
background-color: #f9f9f9;
}
&:last-child {
border-bottom: none;
}
}
td {
padding: 4px 5px;
page-break-inside: avoid;
page-break-after: auto;
border-bottom: 1px solid #d1d1d1;
}
thead {
display: table-header-group;
}
tfoot {
display: table-footer-group;
}
// This should make the <hr> elements more subtle
.admin hr {
border-top: 1px solid #eee;
page-break-after: auto;
margin: 20px 0;
}
// This will avoid fieldset element to have a page-break.
// The fieldset have a display: none on line 21m I'm leaving this code in case
// we decide to make the elements visible again.
fieldset {
page-break-inside: avoid;
}
blockquote {
margin-block-start: 10px;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
font-weight: 600;
}
//Users page for admin
#requests, #bodies {
.accordion-heading {
width: 10cm !important;
font-weight: 600;
}
.item-detail.accordion-body.row {
width: 10cm !important;
border: 1px solid #d1d1d1;
margin-bottom: 25px !important;
div {
border-bottom: 1px solid #d1d1d1;
padding: 4px 5px;
.span6 {
&:first-child {
margin-right: 5px;
}
}
&:last-child {
border-bottom: none;
}
}
div:nth-child(odd) {
-webkit-print-color-adjust: exact;
background-color: #eee;
}
}
}
// Styling for "Stats" page
.hero-unit {
background-color: #f3f3f3;
-webkit-print-color-adjust: exact;
width: 10cm !important;
padding: 10px 15px!important;
border-radius: 3px;
border: 1px solid #e9e9e9;
h2 {
font-weight: 600;
font-size: 9pt;
}
}
.stats-row {
display: flex;
flex-direction: row;
margin-bottom: 15px !important;
.label-info {
color: #fff;
font-weight: bold;
background-color: #3a87ad;
-webkit-print-color-adjust: exact;
border-radius: 3px !important;
padding: 2px 4px;
margin-top: 10px !important;
margin-right: 5px;
}
}