Skip to content

Commit c9480f3

Browse files
bert-githubgsnedders
authored andcommitted
[CSS2] Style rules to make the PDF nicer when generated with Prince.
1 parent b2f560e commit c9480f3

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

css2/style/prince.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* For Prince: */
2+
@page {
3+
@top {
4+
content: "\2013\A0" string(chapter) "\A0\2013";
5+
font-style: italic;
6+
}
7+
@bottom {
8+
content: "\2013\A0" counter(page) "\A0\2013";
9+
}
10+
}
11+
@page :first {
12+
@top {content: none}
13+
}
14+
BODY {hyphens: auto}
15+
H1 {string-set: chapter content()}
16+
H1, H2, H3, H4, H5, H6 {hyphens: manual}
17+
A[HREF] {text-decoration: none}
18+
A[HREF^="#"]::after {
19+
content: "\202f p.\202f" target-counter(attr(href), page);
20+
font-size: 75%;
21+
line-height: 0;
22+
vertical-align: super;
23+
}
24+
.toc A[HREF]::after {
25+
content: leader(dotted) target-counter(attr(href), page);
26+
font-size: inherit;
27+
font-style: normal;
28+
vertical-align: baseline;
29+
}
30+
.index A[HREF]::after {content: none}
31+
.index A[HREF] {content: target-counter(attr(href), page)}

0 commit comments

Comments
 (0)