summaryrefslogtreecommitdiff
path: root/static/css/print.css
blob: afaff435ee5852f42ae069a7d1aab12e8cc2ca09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Print stylesheet inspired by https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/ */
@media print {
	/* Page layout */
	#content, #page {
		width: 100%;
		margin: 0;
		float: none;
	}
	@page { margin: 2cm }
	h2.entry-title { margin-bottom: 0 }

	/* Font */
	body {
		font: 13pt Arial, sans-serif;
		line-height: 1.3;
		background: #fff !important;
		color: #000;
	}
	h1 { font-size: 24pt }
	h2 { font-size: 18pt }
	h3, h4 {
		font-size: 14pt;
		margin-top: 25px;
	}

	/* Page break */
	a, blockquote { page-break-inside:avoid }
	h1, h2, h3, h4, h5, h6 {
		page-break-after:avoid;
		page-break-inside:avoid;
	}
	img {
		page-break-inside:avoid;
		page-break-after:avoid;
	}
	table, pre { page-break-inside:avoid }
	ul, ol, dl  { page-break-before:avoid }

	/* Link */
	a:link, a:visited, a {
		background: transparent;
		color: #520;
		text-align: left;
	}
	a[href^=http]:after { content:" <" attr(href) "> " }
	$a:after > img { content: "" }
	article a[href^="#"]:after { content: "" }
	a:not(:local-link):after { content:" <" attr(href) "> " }

	/* Hide stuff that's needed on paper */
	nav, .translations { display: none }
}