Skip to content

Commit 4fab155

Browse files
add CSS for PDF
1 parent 32f6376 commit 4fab155

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

docs/stylesheets/extra.css

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,59 @@
1818
[data-md-color-accent=red] .md-nav__link:hover {
1919
color: #ff1744;
2020
text-decoration: underline;
21-
}
21+
}
22+
23+
@media print {
24+
.md-container {
25+
display: block;
26+
padding-top: 0;
27+
}
28+
29+
.md-main {
30+
display: block;
31+
height: inherit;
32+
}
33+
34+
.md-main__inner {
35+
height: inherit;
36+
padding-top: 0;
37+
}
38+
39+
.md-typeset .codehilitetable .linenos {
40+
display: none;
41+
}
42+
43+
.md-typeset .footnote-ref {
44+
display: inline-block;
45+
}
46+
47+
.md-typeset .admonition {
48+
display: block;
49+
}
50+
51+
.md-typeset a::after {
52+
color: inherit;
53+
content: none;
54+
}
55+
56+
h1 {
57+
page-break-before: always;
58+
}
59+
60+
#about {
61+
page-break-before: avoid;
62+
}
63+
}
64+
65+
@page {
66+
size: A4;
67+
margin-top: 1.0cm;
68+
margin-right: 1.0cm;
69+
margin-bottom: 2.0cm;
70+
margin-left: 1.0cm;
71+
72+
@bottom-center {
73+
content: "Page " counter(page) " of " counter(pages);
74+
font-family: "Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
75+
}
76+
}

0 commit comments

Comments
 (0)