diff options
author | Akshay <[email protected]> | 2020-04-16 16:11:08 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-04-16 16:11:08 +0100 |
commit | 029ba179857ee74298f154df835be4192199eece (patch) | |
tree | 8c7bcbfb970a6b3d6777e1ae15e73501b642bc3a /docs/syntax.css | |
parent | ada45c1bea838e5f38f24fe37e558c1b7959ae28 (diff) |
add syntax highlighting to code blocks
Diffstat (limited to 'docs/syntax.css')
-rw-r--r-- | docs/syntax.css | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/docs/syntax.css b/docs/syntax.css new file mode 100644 index 0000000..fbfb6fe --- /dev/null +++ b/docs/syntax.css | |||
@@ -0,0 +1,167 @@ | |||
1 | code { | ||
2 | white-space: pre-wrap; | ||
3 | } | ||
4 | |||
5 | span.smallcaps { | ||
6 | font-variant: small-caps; | ||
7 | } | ||
8 | |||
9 | span.underline { | ||
10 | text-decoration: underline; | ||
11 | } | ||
12 | |||
13 | div.column { | ||
14 | display: inline-block; | ||
15 | vertical-align: top; | ||
16 | width: 50%; | ||
17 | } | ||
18 | |||
19 | div.hanging-indent { | ||
20 | margin-left: 1.5em; | ||
21 | text-indent: -1.5em; | ||
22 | } | ||
23 | |||
24 | ul.task-list { | ||
25 | list-style: none; | ||
26 | } | ||
27 | |||
28 | pre > code.sourceCode { | ||
29 | white-space: pre; | ||
30 | position: relative; | ||
31 | } | ||
32 | |||
33 | pre > code.sourceCode > span { | ||
34 | display: inline-block; | ||
35 | line-height: 1.25; | ||
36 | } | ||
37 | |||
38 | pre > code.sourceCode > span:empty { | ||
39 | height: 1.2em; | ||
40 | } | ||
41 | |||
42 | code.sourceCode > span { | ||
43 | color: inherit; | ||
44 | text-decoration: inherit; | ||
45 | } | ||
46 | |||
47 | div.sourceCode { | ||
48 | margin: 1em 0; | ||
49 | } | ||
50 | |||
51 | pre.sourceCode { | ||
52 | margin: 0; | ||
53 | } | ||
54 | |||
55 | @media screen { | ||
56 | div.sourceCode { | ||
57 | overflow: auto; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | @media print { | ||
62 | pre > code.sourceCode { | ||
63 | white-space: pre-wrap; | ||
64 | } | ||
65 | pre > code.sourceCode > span { | ||
66 | text-indent: -5em; | ||
67 | padding-left: 5em; | ||
68 | } | ||
69 | } | ||
70 | |||
71 | pre.numberSource code { | ||
72 | counter-reset: source-line 0; | ||
73 | } | ||
74 | |||
75 | pre.numberSource code > span { | ||
76 | position: relative; | ||
77 | left: -4em; | ||
78 | counter-increment: source-line; | ||
79 | } | ||
80 | |||
81 | pre.numberSource code > span > a:first-child::before { | ||
82 | content: counter(source-line); | ||
83 | position: relative; | ||
84 | left: -1em; | ||
85 | text-align: right; | ||
86 | vertical-align: baseline; | ||
87 | border: none; | ||
88 | display: inline-block; | ||
89 | -webkit-touch-callout: none; | ||
90 | -webkit-user-select: none; | ||
91 | -khtml-user-select: none; | ||
92 | -moz-user-select: none; | ||
93 | -ms-user-select: none; | ||
94 | user-select: none; | ||
95 | padding: 0 4px; | ||
96 | width: 4em; | ||
97 | } | ||
98 | |||
99 | pre.numberSource { | ||
100 | margin-left: 3em; | ||
101 | padding-left: 4px; | ||
102 | } | ||
103 | |||
104 | div.sourceCode { | ||
105 | } | ||
106 | |||
107 | @media screen { | ||
108 | pre > code.sourceCode > span > a:first-child::before { | ||
109 | text-decoration: underline; | ||
110 | } | ||
111 | } | ||
112 | |||
113 | code span.al { | ||
114 | font-weight: bold; | ||
115 | } | ||
116 | |||
117 | code span.an { | ||
118 | font-style: italic; | ||
119 | } | ||
120 | |||
121 | code span.cf { | ||
122 | font-weight: bold; | ||
123 | } | ||
124 | |||
125 | code span.co { | ||
126 | font-style: italic; | ||
127 | } | ||
128 | |||
129 | code span.cv { | ||
130 | font-style: italic; | ||
131 | } | ||
132 | |||
133 | code span.do { | ||
134 | font-style: italic; | ||
135 | } | ||
136 | |||
137 | code span.dt { | ||
138 | text-decoration: underline; | ||
139 | } | ||
140 | |||
141 | code span.er { | ||
142 | font-weight: bold; | ||
143 | } | ||
144 | |||
145 | code span.in { | ||
146 | font-style: italic; | ||
147 | } | ||
148 | |||
149 | code span.kw { | ||
150 | font-weight: bold; | ||
151 | } | ||
152 | |||
153 | code span.pp { | ||
154 | font-weight: bold; | ||
155 | } | ||
156 | |||
157 | code span.wa { | ||
158 | font-style: italic; | ||
159 | } | ||
160 | |||
161 | code span.st { | ||
162 | color: var(--cyan); | ||
163 | } | ||
164 | |||
165 | code span.at { | ||
166 | color: var(--pink); | ||
167 | } | ||