Submitted this to the byteflow hackers, figured some might be able to use it as well. Code blocks don’t wrap lines (<pre>), probably want to have control of how it overflows.
Here’s the patch:
# HG changeset patch
# User bsmith@linode.just-another.net
# Date 1212606740 14400
# Node ID 9337a362eeacbe88db2da11d38e238db2644e31b
# Parent 93c1106436dd09dde52ec1dd25cfbbeca7cec00b
Add scroll if lines don't wrap in code blocks.
diff -r 93c1106436dd -r 9337a362eeac static/css/highlight.css
--- a/static/css/highlight.css Wed Jun 04 09:47:44 2008 +0300
+++ b/static/css/highlight.css Wed Jun 04 15:12:20 2008 -0400
@@ -1,6 +1,7 @@ pre code {
pre code {
display: block;
background: #F0F0F0;
+ overflow:auto;
}
pre code,

Comments
I get annoyed with having scrollbars in code samples (the result of overflow:auto), so when I found this CSS tidbit the other day I was quite happy:
The net effect is that your text will wrap rather than forcing the pre area to have a horizontal scrollbar.
Our opinions on this vary quite a bit :). I don’t like wrapping in a pre. I expect pre to respect what it’s made to do, preserving line breaks and whitespace. I’d rather it scroll than modify what goes in it.
Really neat trick though!
Comment form for «Byteflow usability quick change.»