Skip to content

Commit e9d8930

Browse files
committed
[CSS2] Style rules to make the PDF nicer when generated with Prince.
1 parent 6d851c3 commit e9d8930

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

css2/style/prince.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
15+
BODY {hyphens: auto}
16+
H1 {string-set: chapter content()}
17+
H1, H2, H3, H4, H5, H6 {hyphens: manual}
18+
A[HREF] {text-decoration: none}
19+
A[HREF^="#"]::after {
20+
content: "\202f p.\202f" target-counter(attr(href), page);
21+
font-size: 75%;
22+
line-height: 0;
23+
vertical-align: super;
24+
}
25+
.toc A[HREF]::after {
26+
content: leader(dotted) target-counter(attr(href), page);
27+
font-size: inherit;
28+
font-style: normal;
29+
vertical-align: baseline;
30+
}
31+
.index A[HREF]::after {content: none}
32+
.index A[HREF] {content: target-counter(attr(href), page)}

0 commit comments

Comments
 (0)