summaryrefslogtreecommitdiff
path: root/cgithub/public/static/style.css
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-08-27 14:08:06 -0400
committerJoe Mou <dev@mou.fo>2026-08-27 14:53:38 -0400
commit0d60b8c8235c3c07f675aba7a56dd37b62519f9e (patch)
tree8c94cef7b3530e72fc8542072b037081e5bb18ae /cgithub/public/static/style.css
parent16dfeb61f79e6cd44c667422b8dc50f226269d80 (diff)
Display PDF blobs
GitHub renders a PDF with a viewer of its own and so ships no content for one, leaving the blob view with nothing to show. Its raw bytes come as application/octet-stream, which browsers download rather than display, so serve them from a new embed route that retypes them and point an <object> at that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BErPR92xppzGFXkPqXPYj2
Diffstat (limited to 'cgithub/public/static/style.css')
-rw-r--r--cgithub/public/static/style.css7
1 files changed, 7 insertions, 0 deletions
diff --git a/cgithub/public/static/style.css b/cgithub/public/static/style.css
index ed64bc6..157cc15 100644
--- a/cgithub/public/static/style.css
+++ b/cgithub/public/static/style.css
@@ -276,6 +276,13 @@ body > footer {
}
}
+object.pdf {
+ display: block;
+ width: 100%;
+ height: 80vh;
+ padding: 0;
+}
+
pre.box {
/* Instead of scrolling overflow for long lines, grow the box. */
width: fit-content;