From d1b50598c6ba7f0ca61bb0ea5e4ff9c66c226b4e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 19 Jul 2026 15:47:52 -1000 Subject: Keep line structure in plaintext readmes --- assets/cgit.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'assets/cgit.css') diff --git a/assets/cgit.css b/assets/cgit.css index 10fcf66..f441faa 100644 --- a/assets/cgit.css +++ b/assets/cgit.css @@ -496,6 +496,24 @@ div#cgit div#summary pre { overflow-x: auto; } +/* A plaintext readme served without an about filter. Wrapped instead of + * scrolled, since prose is the common case. */ +div#cgit pre.plaintext { + white-space: pre-wrap; + overflow-wrap: anywhere; + font-family: var(--font-mono); + line-height: 1.5; + margin: 0; +} + +/* Markdown source before the client-side renderer has run, and for good + * when scripting is off. Keeps the line structure so it reads as text. */ +div#cgit .markdown[data-markdown] { + white-space: pre-wrap; + overflow-wrap: anywhere; + font-family: var(--font-mono); +} + div#cgit .markdown { line-height: 1.6; overflow-wrap: break-word; -- cgit v2.8.0