Proposed change to bugs.css for text-wrapping in <pre> blocks
Dear bugs.debian.org Web Site Maintainer(s),
I find bug reports difficult to read because when there are long
lines. A bug's "message text" is wrapped in a <pre> tag -- which does
not word-wrap well on most browsers. As a result, when someone types
a long paragraph that is not word-wrapped, or there is a really long
line of output, it ends up being making the page really wide. This
requires the user to scroll horizontally to read it, like a news ticker.
If you were to enforce wordwrap via CSS, then program output and code
would be forced to wrap as well. I find this trade-off acceptable,
rather than being forced to scroll. If someone needed an exactly-
formatted line, they could copy and paste - from the browser to the
editor or shell - with original line breaks in tact.
A detailed explanation of this hack is here:
http://cheeaun.phoenity.com/weblog/2005/06/whitespace-and-generated-
content.html
Thanks,
Jeremy Seitz
The following change to bugs.css (used by bugreport.cgi) would enable
this behavior for all <pre> tags:
--- bugs.css 2006-04-25 00:04:24.000000000 -0400
+++ bugs.css 2006-04-25 00:07:26.000000000 -0400
@@ -69,6 +69,18 @@
font-size: 95%;
}
+
+pre {
+ white-space: pre; /* CSS2 */
+ white-space: -moz-pre-wrap; /* Mozilla */
+ white-space: -hp-pre-wrap; /* HP printers */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: pre-wrap; /* CSS 2.1 */
+ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
+ word-wrap: break-word; /* IE */
+
+}
+
pre.message {
font-family: monospace;
padding-top: 0;
Reply to: