-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpdf.css
More file actions
152 lines (131 loc) · 2.59 KB
/
Copy pathpdf.css
File metadata and controls
152 lines (131 loc) · 2.59 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* GIT Going with GitHub — PDF Stylesheet (WeasyPrint) */
@page {
size: letter;
margin: 2.5cm 2cm 2.5cm 2cm;
@bottom-center {
content: counter(page);
font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 0.8em;
color: #6b7280;
}
}
/* ---- Body & typography ---- */
body {
font-family: Georgia, "Times New Roman", serif;
font-size: 11pt;
line-height: 1.7;
color: #1a1a1a;
}
/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
font-weight: 700;
line-height: 1.3;
margin-top: 1.5em;
margin-bottom: 0.5em;
page-break-after: avoid;
}
h1 {
font-size: 20pt;
border-bottom: 2px solid #1a1a1a;
padding-bottom: 0.3em;
page-break-before: always;
}
h1:first-child {
page-break-before: avoid;
}
h2 { font-size: 15pt; }
h3 { font-size: 12pt; }
h4 { font-size: 11pt; font-style: italic; }
/* ---- Paragraphs ---- */
p {
margin-top: 0;
margin-bottom: 0.9em;
orphans: 3;
widows: 3;
}
/* ---- Links ---- */
a {
color: #0550ae;
text-decoration: underline;
}
/* Print URLs after external links */
a[href^="http"]::after {
content: " (" attr(href) ")";
font-size: 0.8em;
color: #6b7280;
word-break: break-all;
}
/* ---- Code ---- */
code, kbd, samp {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.88em;
background: #f3f4f6;
padding: 0.1em 0.3em;
border-radius: 3px;
}
pre {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.8em;
background: #f3f4f6;
border: 1px solid #d1d5db;
border-radius: 4px;
padding: 0.8em;
white-space: pre-wrap;
word-break: break-word;
page-break-inside: avoid;
}
pre code {
background: none;
padding: 0;
border-radius: 0;
font-size: 1em;
}
/* ---- Blockquotes ---- */
blockquote {
margin: 1em 0 1em 1.5em;
padding-left: 1em;
border-left: 3px solid #9ca3af;
color: #4b5563;
font-style: italic;
}
/* ---- Lists ---- */
ul, ol {
margin: 0.5em 0 0.9em 1.5em;
padding: 0;
}
li {
margin-bottom: 0.3em;
}
/* ---- Tables ---- */
table {
width: 100%;
border-collapse: collapse;
margin: 1em 0;
font-size: 0.88em;
page-break-inside: avoid;
}
th, td {
border: 1px solid #d1d5db;
padding: 0.4em 0.6em;
text-align: left;
vertical-align: top;
}
th {
background: #f3f4f6;
font-weight: 700;
}
tr:nth-child(even) td {
background: #fafafa;
}
/* ---- Horizontal rules ---- */
hr {
border: none;
border-top: 1px solid #d1d5db;
margin: 1.5em 0;
}
/* ---- Images ---- */
img {
max-width: 100%;
height: auto;
}