-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.go
108 lines (87 loc) · 1.48 KB
/
style.go
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
// vim: set filetype=css :
// Copyright 2016 Manlio Perillo. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Definition of the CSS template.
package main
var style = `
* {
margin: 0;
padding: 0;
}
.line {
color: #999;
}
.operator, .ident {
font-style: normal;
font-weight: normal;
}
.keyword {
font-weight: bold;
}
.builtin {
font-weight: bold;
font-style: italic;
}
.literal {
font-style: italic;
}
.comment {
font-style: oblique;
}
.invalid {
background-color: red;
}
@media print {
@page {
size: {{ .PageSize }};
margin: {{ .PageMargin }};
font-size: {{ .Font.Size }};
counter-increment: page 1;
@top-left {
vertical-align: bottom;
margin-bottom: 1.5em;
content: "{{ .ImportPath }}";
}
@top-right {
vertical-align: bottom;
margin-bottom: 1.5em;
content: string(file);
}
@bottom-right {
vertical-align: top;
margin-top: 1.5em;
content: "page " counter(page);
}
}
.package > h1 {
display: none;
}
.file {
page-break-after: always;
string-set: file attr(data-file);
}
.file:last-of-type {
page-break-after: auto;
}
.file > h1 {
display: none;
}
code {
display: block;
font-family: "{{ .Font.Family }}", Courier, monospace;
font-size: {{ .Font.Size }};
line-height: {{ .Font.LineHeight }};
}
}
@media screen {
.package > h1 {
font-size: 28px;
}
.file > h1 {
margin: 16px;
font-size: 24px;
text-align: center;
}
}
`