-
Notifications
You must be signed in to change notification settings - Fork 594
/
gfm.css.ts
48 lines (39 loc) · 948 Bytes
/
gfm.css.ts
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
import { Handlers } from "$fresh/server.ts";
import { gfm } from "../utils/markdown.ts";
// TODO(lucacasonato): hash the file and use the hash as the filename, and serve
// with high-cacheability headers.
const CSS = `${gfm.CSS}
ol.nested {
counter-reset: item;
}
ol.nested li {
display: block;
}
ol.nested li:before {
font-feature-settings: "kern" 1, "tnum" 1;
-webkit-font-feature-settings: "kern" 1, "tnum" 1;
-ms-font-feature-settings: "kern" 1, "tnum" 1;
-moz-font-feature-settings: "kern" 1, "tnum" 1;
content: counters(item, ".") ". ";
counter-increment: item;
}
.markdown-body ul {
list-style: disc;
}
.markdown-body ol {
list-style: numeric;
}
.toggle:checked + .toggled {
display: block;
}
`;
export const handler: Handlers = {
GET: () => {
return new Response(CSS, {
headers: {
"content-type": "text/css",
"cache-control": "public, max-age=31536000, immutable",
},
});
},
};