Add print.css

This commit is contained in:
Marcus Kammer 2024-07-23 18:05:35 +02:00
parent 1615a717e2
commit f95001113d

60
public/print.css Normal file
View file

@ -0,0 +1,60 @@
/* General print styles */
@media print {
/* Hide non-essential elements */
header, footer, nav, aside {
display: none;
}
/* Ensure all text is black for readability */
body {
color: black;
background: white;
font-family: "Helvetica Neue", "Noto Sans", Arial, sans-serif;
font-size: 12pt;
}
/* Remove background colors and images */
* {
background: none !important;
color: black !important;
}
/* Adjust layout for print */
main {
width: 100%;
margin: 0;
padding: 0;
}
/* Ensure links are visible */
a:link, a:visited {
color: black;
text-decoration: underline;
}
/* Page breaks */
h1, h2, h3, h4, h5, h6 {
page-break-after: avoid;
}
p, blockquote, ul, ol, dl, table, pre {
page-break-inside: avoid;
}
/* Table styling */
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 5px;
}
/* Images */
img {
max-width: 100%;
height: auto;
}
}